Preventing protective case from turning off screen by mistake on terminal using hall effect sensor

ABSTRACT

In a terminal control method, a terminal may be disposed with two Hall effect sensors for sensing a change of a magnetic field generated by a magnet in a protective case, and identify a forward snap-fit operation, an opening operation, a backward snap-fit operation, and the like of the protective case. When detecting the forward snap-fit operation of the protective case, the terminal performs a screen off operation; or when detecting the backward snap-fit operation of the protective case, the terminal may skip performing screen off operation. Thus, the protective case can be prevented from turning off a screen by mistake.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a national stage application of InternationalApplication No. PCT/CN2017/100259 filed on Sep. 1, 2017, which claimspriority to Chinese Patent Application No. 201610973390.X filed on Nov.3, 2016, International Patent Application No. PCT/CN2016/113281, filedon Dec. 29, 2016, and Chinese Patent Application No. 201710365478.8filed on May 22, 2017. All of the aforementioned applications are herebyincorporated by reference in their entireties.

TECHNICAL FIELD

The present invention relates to the field of terminal technologies, andin particular, to a terminal control method, a protective case, and aterminal.

BACKGROUND

With rapid development of Internet technologies and computertechnologies, various terminals such as smartphones and tablet computershave become indispensable communication, entertainment, and life toolsin people's life, and protective cases of terminals such as cases ofmobile phones are also widely applied to terminals because the cases areequipped with a drop-proof function, a scratch-resistant function, andother functions. Currently, a protective case of a terminal has anotherauxiliary function such as a screen locking function in addition to afunction of protecting the terminal. The terminal is controlled by usingthe protective case. For example, when a user closes the protective caseof the terminal, a screen of the terminal is locked; or when the useropens the protective case, the screen of the terminal is woken up from ascreen locked state, thereby reducing power consumption of the terminal,facilitating a user operation, and improving working efficiency.

A terminal is controlled by using an existing protective case accordingto the following principle: When a user closes the protective case, aHall effect sensor in a terminal senses a magnetic field changegenerated by a magnet in a case, and the terminal performs a screenlocking operation; or when the user opens the protective case, the Halleffect sensor in the terminal senses a magnetic field change generatedby the magnet in the case, and the terminal performs a screen wakeupoperation. However, a position explored by using a conventional terminalcontrol method is not an optimal position, and therefore terminalcontrol may be insensitive.

SUMMARY

A purpose of this application is to provide a terminal control method, aprotective case, and a terminal, to improve terminal controlsensitivity.

According to a first aspect, an embodiment of the present inventionprovides a terminal control method, including:

performing a target operation in response to an operation of detectingthat an output signal of a first Hall effect sensor changes and anoutput signal of a second Hall effect sensor changes, where the firstHall effect sensor and the first Hall effect sensor output signals bysensing a magnetic field, where

the magnetic field is a magnetic field generated by a magnet built in aterminal, or a magnetic field generated by a magnet built in aprotective case of the terminal.

In this embodiment of the present invention, a terminal control systemincludes two Hall effect sensors, a position of the magnet needs to meetresponse requirements for the two Hall effect sensors to implementcontrol over the terminal, and the position of the magnet that meets aresponse condition of the terminal is a better position, so as toimprove terminal control sensitivity.

In an embodiment of the present invention, the performing a targetoperation in response to an operation of detecting that an output signalof a first Hall effect sensor changes and an output signal of a secondHall effect sensor changes includes at least one of the following steps:

performing a first operation in response to an operation of detectingthat the output signal of the first Hall effect sensor changes into afirst signal and the output signal of the second Hall effect sensorchanges into a second signal;

performing a second operation in response to an operation of detectingthat the output signal of the first Hall effect sensor changes into athird signal and the output signal of the second Hall effect sensorchanges into a fourth signal; and

performing a third operation in response to an operation of detectingthat the output signal of the first Hall effect sensor changes into afifth signal and the output signal of the second Hall effect sensorchanges into a sixth signal, where

the first signal is an electrical signal output by the first Hall effectsensor when a magnetic field whose strength is not less than a firstmagnetic field strength passes through a working plane of the first Halleffect sensor from a first surface of the first Hall effect sensor, andthe second signal is an electrical signal output by the second Halleffect sensor when a magnetic field whose strength is not less than asecond magnetic field strength passes through a working plane of thesecond Hall effect sensor from a first surface of the second Hall effectsensor;

the third signal is an electrical signal output by the first Hall effectsensor when the magnetic field whose strength is not less than the firstmagnetic field strength passes through the working plane of the firstHall effect sensor from a second surface of the first Hall effectsensor, and the fourth signal is an electrical signal output by thesecond Hall effect sensor when the magnetic field whose strength is notless than the second magnetic field strength passes through the workingplane of the second Hall effect sensor from a second surface of thesecond Hall effect sensor; and

the fifth signal is an electrical signal output by the first Hall effectsensor when a magnetic field whose strength is less than the firstmagnetic field strength passes through the working plane of the firstHall effect sensor, and the sixth signal is an electrical signal outputby the second Hall effect sensor when a magnetic field whose strength isless than the second magnetic field strength passes through the workingplane of the second Hall effect sensor.

In an embodiment of the present invention, the first operation includesa screen off operation, the second operation includes no operation, andthe third operation includes a screen wakeup operation.

In an embodiment of the present invention, the first surface of thefirst Hall effect sensor and the second surface of the first Hall effectsensor are two opposite surfaces of the first Hall effect sensor, andboth the first surface of the first Hall effect sensor and the secondsurface of the first Hall effect sensor are parallel to the workingplane of the first Hall effect sensor; and

the first surface of the second Hall effect sensor and the secondsurface of the second Hall effect sensor are two opposite surfaces ofthe second Hall effect sensor, and both the first surface of the secondHall effect sensor and the second surface of the second Hall effectsensor are parallel to the working plane of the Hall effect sensor.

In this embodiment of the present invention, positions of the magnet,the first Hall effect sensor, and the second Hall effect sensor are set,so that the first signal and the third signal have opposite polarities,and the second signal and the fourth signal have opposite polarities,thereby avoiding a misoperation of the terminal and improving userexperience.

In an embodiment of the present invention, the first Hall effect sensorand the second Hall effect sensor are disposed in the protective case;and before the performing a target operation, the method furtherincludes: receiving an operation indication instruction sent by theprotective case, where the operation indication instruction is aninstruction that is generated by the protective case based on a changeof the output signal of the first Hall effect sensor and a change of theoutput signal of the second Hall effect sensor and that is sent to theterminal, and is used to instruct the terminal to perform the targetoperation.

In an embodiment of the present invention, the magnet is a strip magnet,and the protective case includes a base plate and a flip plate that areused to fasten the terminal, and a flip shaft that connects the baseplate and the flip plate; and

the first Hall effect sensor and the second Hall effect sensor aredisposed in the flip plate of the protective case, and the strip magnetis disposed in the terminal or the base plate of the protective case; orthe strip magnet is disposed in the flip plate of the protective case,and the first Hall effect sensor and the second Hall effect sensor aredisposed in the terminal or the base plate of the protective case.

In an embodiment of the present invention, the magnet is a strip magnet,and the terminal includes a first body, a second body, and a flip shaftthat connects the first body and the second body; and

the first Hall effect sensor and the second Hall effect sensor aredisposed in the first body, and the strip magnet is disposed in thesecond body.

In an embodiment of the present invention, the working plane of thefirst Hall effect sensor is parallel to the working plane of the secondHall effect sensor; and

when the terminal is in a closed state, a connection line between anorth pole of the magnet and a south pole of the magnet is parallel tothe working plane of the first Hall effect sensor, and a distancebetween the first Hall effect sensor or the second Hall effect sensorand a projection of the strip magnet onto a plane on which the workingplane of the first Hall effect sensor is located is greater than a firstdistance threshold.

In an embodiment of the present invention, the magnet includes a firstmagnet and a second magnet, the first magnet generates the magneticfield whose strength is not less than the first magnetic field strength,and the second magnet generates the magnetic field whose strength is notless than the second magnetic field strength.

According to a second aspect, an embodiment of the present inventionfurther provides a terminal control method, including:

sending, by a protective case, an operation indication instruction to aterminal in response to an operation of detecting that an output signalof a first Hall effect sensor changes and an output signal of a secondHall effect sensor changes, where the operation indication instructionis generated by the protective case based on a change of the outputsignal of the first Hall effect sensor and a change of the output signalof the second Hall effect sensor, and is used to instruct the terminalto perform a target operation, where

the first Hall effect sensor and the first Hall effect sensor outputsignals by sensing a magnetic field; and

the magnetic field is a magnetic field generated by a magnet built inthe terminal, or a magnetic field generated by a magnet built in theprotective case of the terminal, and the first Hall effect sensor andthe second Hall effect sensor are disposed in the protective case.

In this embodiment of the present invention, a terminal control systemincludes two Hall effect sensors, and a position of the magnet needs tomeet response requirements for the two Hall effect sensors to implementcontrol over the terminal. In this way, terminal control is moreprecise.

In an embodiment of the present invention, the sending, by a protectivecase, an operation indication instruction to a terminal in response toan operation of detecting that an output signal of a first Hall effectsensor changes and an output signal of a second Hall effect sensorchanges includes at least one of the following steps:

sending, by the protective case, a first operation indicationinstruction to the terminal in response to an operation of detectingthat the output signal of the first Hall effect sensor changes into afirst signal and the output signal of the second Hall effect sensorchanges into a second signal, where the first operation indicationinstruction is generated by the protective case based on the firstsignal and the second signal, and is used to instruct the terminal toperform a first operation;

sending, by the protective case, a second operation indicationinstruction to the terminal in response to an operation of detectingthat the output signal of the first Hall effect sensor changes into athird signal and the output signal of the second Hall effect sensorchanges into a fourth signal, where the second operation indicationinstruction is generated by the protective case based on the thirdsignal and the fourth signal, and is used to instruct the terminal toperform a second operation; and

sending, by the protective case, a third operation indicationinstruction to the terminal in response to an operation of detectingthat the output signal of the first Hall effect sensor changes into afifth signal and the output signal of the second Hall effect sensorchanges into a sixth signal, where the third operation indicationinstruction is generated by the protective case based on the fifthsignal and the sixth signal, and is used to instruct the terminal toperform a third operation, where

the first signal is an electrical signal output by the first Hall effectsensor when a magnetic field whose strength is not less than a firstmagnetic field strength passes through a working plane of the first Halleffect sensor from a first surface of the first Hall effect sensor, andthe second signal is an electrical signal output by the second Halleffect sensor when a magnetic field whose strength is not less than asecond magnetic field strength passes through a working plane of thesecond Hall effect sensor from a first surface of the second Hall effectsensor;

the third signal is an electrical signal output by the first Hall effectsensor when the magnetic field whose strength is not less than the firstmagnetic field strength passes through the working plane of the firstHall effect sensor from a second surface of the first Hall effectsensor, and the fourth signal is an electrical signal output by thesecond Hall effect sensor when the magnetic field whose strength is notless than the second magnetic field strength passes through the workingplane of the second Hall effect sensor from a second surface of thesecond Hall effect sensor; and

the fifth signal is an electrical signal output by the first Hall effectsensor when a magnetic field whose strength is less than the firstmagnetic field strength passes through the working plane of the firstHall effect sensor, and the sixth signal is an electrical signal outputby the second Hall effect sensor when a magnetic field whose strength isless than the second magnetic field strength passes through the workingplane of the second Hall effect sensor.

In an embodiment of the present invention, the first operation includesa screen off operation, the second operation includes no operation, andthe third operation includes a screen wakeup operation.

In an embodiment of the present invention, the first surface of thefirst Hall effect sensor and the second surface of the first Hall effectsensor are two opposite surfaces of the first Hall effect sensor, andboth the first surface of the first Hall effect sensor and the secondsurface of the first Hall effect sensor are parallel to the workingplane of the first Hall effect sensor; and

the first surface of the second Hall effect sensor and the secondsurface of the second Hall effect sensor are two opposite surfaces ofthe second Hall effect sensor, and both the first surface of the secondHall effect sensor and the second surface of the second Hall effectsensor are parallel to the working plane of the Hall effect sensor.

In this embodiment of the present invention, positions of the magnet,the first Hall effect sensor, and the second Hall effect sensor are set,so that the first signal and the third signal have opposite polarities,and the second signal and the fourth signal have opposite polarities,thereby avoiding a misoperation of the terminal and improving userexperience.

In an embodiment of the present invention, the protective case includesa base plate and a flip plate that are used to fasten the terminal, anda flip shaft that connects the base plate and the flip plate; and

the first Hall effect sensor and the second Hall effect sensor aredisposed in the flip plate, and the magnet is disposed in the terminalor the base plate of the protective case; or the first Hall effectsensor and the second Hall effect sensor are disposed in the base plate,and the magnet is disposed in the flip plate.

In an embodiment of the present invention, the magnet is a strip magnet,and the working plane of the first Hall effect sensor is parallel to theworking plane of the second Hall effect sensor; and

when the protective case is in a closed state, a connection line betweena north pole of the magnet and a south pole of the magnet is parallel tothe working plane of the first Hall effect sensor, and a distancebetween the first Hall effect sensor or the second Hall effect sensorand a projection of the strip magnet onto a plane on which the workingplane of the first Hall effect sensor is located is greater than a firstdistance threshold.

In an embodiment of the present invention, the magnet includes a firstmagnet and a second magnet, the first magnet generates the magneticfield whose strength is not less than the first magnetic field strength,and the second magnet generates the magnetic field whose strength is notless than the second magnetic field strength.

According to a third aspect, an embodiment of the present inventionfurther provides a terminal, including:

a detection unit, configured to detect a change of an output signal of afirst Hall effect sensor and a change of an output signal of a secondHall effect sensor; and

a processing unit, configured to perform a target operation in responseto an operation of detecting that the output signal of the first Halleffect sensor changes and the output signal of the second Hall effectsensor changes, where

the first Hall effect sensor and the first Hall effect sensor outputsignals by sensing a magnetic field; and

the magnetic field is a magnetic field generated by a magnet built inthe terminal, or a magnetic field generated by a magnet built in aprotective case of the terminal.

In an embodiment of the present invention, the processing unit isspecifically configured to perform at least one of the following steps:

performing a first operation in response to an operation of detectingthat the output signal of the first Hall effect sensor changes into afirst signal and the output signal of the second Hall effect sensorchanges into a second signal;

performing a second operation in response to an operation of detectingthat the output signal of the first Hall effect sensor changes into athird signal and the output signal of the second Hall effect sensorchanges into a fourth signal; and

performing a third operation in response to an operation of detectingthat the output signal of the first Hall effect sensor changes into afifth signal and the output signal of the second Hall effect sensorchanges into a sixth signal, where

the first signal is an electrical signal output by the first Hall effectsensor when a magnetic field whose strength is not less than a firstmagnetic field strength passes through a working plane of the first Halleffect sensor from a first surface of the first Hall effect sensor, andthe second signal is an electrical signal output by the second Halleffect sensor when a magnetic field whose strength is not less than asecond magnetic field strength passes through a working plane of thesecond Hall effect sensor from a first surface of the second Hall effectsensor;

the third signal is an electrical signal output by the first Hall effectsensor when the magnetic field whose strength is not less than the firstmagnetic field strength passes through the working plane of the firstHall effect sensor from a second surface of the first Hall effectsensor, and the fourth signal is an electrical signal output by thesecond Hall effect sensor when the magnetic field whose strength is notless than the second magnetic field strength passes through the workingplane of the second Hall effect sensor from a second surface of thesecond Hall effect sensor; and

the fifth signal is an electrical signal output by the first Hall effectsensor when a magnetic field whose strength is less than the firstmagnetic field strength passes through the working plane of the firstHall effect sensor, and the sixth signal is an electrical signal outputby the second Hall effect sensor when a magnetic field whose strength isless than the second magnetic field strength passes through the workingplane of the second Hall effect sensor.

In an embodiment of the present invention, the first surface of thefirst Hall effect sensor and the second surface of the first Hall effectsensor are two opposite surfaces of the first Hall effect sensor, andboth the first surface of the first Hall effect sensor and the secondsurface of the first Hall effect sensor are parallel to the workingplane of the first Hall effect sensor; and

the first surface of the second Hall effect sensor and the secondsurface of the second Hall effect sensor are two opposite surfaces ofthe second Hall effect sensor, and both the first surface of the secondHall effect sensor and the second surface of the second Hall effectsensor are parallel to the working plane of the Hall effect sensor.

In an embodiment of the present invention, the first Hall effect sensorand the second Hall effect sensor are disposed in the protective case;and

the terminal further includes a receiving unit, configured to receive anoperation indication instruction sent by the protective case, where theoperation indication instruction is an instruction that is generated bythe protective case based on the change of the output signal of thefirst Hall effect sensor and the change of the output signal of thesecond Hall effect sensor and that is sent to the terminal, and is usedto instruct the terminal to perform the target operation.

In an embodiment of the present invention, the magnet is a strip magnet,and the protective case includes a base plate and a flip plate that areused to fasten the terminal, and a flip shaft that connects the baseplate and the flip plate; and

the first Hall effect sensor and the second Hall effect sensor aredisposed in the flip plate of the protective case, and the strip magnetis disposed in the terminal or the base plate of the protective case; orthe strip magnet is disposed in the flip plate of the protective case,and the first Hall effect sensor and the second Hall effect sensor aredisposed in the terminal or the base plate of the protective case.

In an embodiment of the present invention, the magnet is a strip magnet,and the terminal includes a first body, a second body, and a flip shaftthat connects the first body and the second body; and

the first Hall effect sensor and the second Hall effect sensor aredisposed in the first body, and the strip magnet is disposed in thesecond body.

In an embodiment of the present invention, the working plane of thefirst Hall effect sensor is parallel to the working plane of the secondHall effect sensor; and

when the terminal is in a closed state, a connection line between anorth pole of the magnet and a south pole of the magnet is parallel tothe working plane of the first Hall effect sensor, and a distancebetween the first Hall effect sensor or the second Hall effect sensorand a projection of the strip magnet onto a plane on which the workingplane of the first Hall effect sensor is located is greater than a firstdistance threshold.

In an embodiment of the present invention, the magnet includes a firstmagnet and a second magnet, the first magnet generates the magneticfield whose strength is not less than the first magnetic field strength,and the second magnet generates the magnetic field whose strength is notless than the second magnetic field strength.

According to a fourth aspect, an embodiment of the present inventionfurther provides a protective case, including:

a detection unit, configured to detect an output signal of a first Halleffect sensor and an output signal of a second Hall effect sensor; and

a sending unit, configured to send an operation indication instructionto a terminal in response to an operation of detecting that the outputsignal of the first Hall effect sensor changes and the output signal ofthe second Hall effect sensor changes, where the operation indicationinstruction is generated by the protective case based on a change of theoutput signal of the first Hall effect sensor and a change of the outputsignal of the second Hall effect sensor, and is used to instruct theterminal to perform a target operation, where

the first Hall effect sensor and the first Hall effect sensor outputsignals by sensing a magnetic field; and

the magnetic field is a magnetic field generated by a magnet built inthe terminal, or a magnetic field generated by a magnet built in theprotective case of the terminal, and the first Hall effect sensor andthe second Hall effect sensor are disposed in the protective case.

In an embodiment of the present invention, the sending unit isspecifically configured to perform at least one of the following steps:

sending a first operation indication instruction to the terminal inresponse to an operation of detecting that the output signal of thefirst Hall effect sensor changes into a first signal and the outputsignal of the second Hall effect sensor changes into a second signal,where the first operation indication instruction is generated by theprotective case based on the first signal and the second signal, and isused to instruct the terminal to perform a first operation;

sending a second operation indication instruction to the terminal inresponse to an operation of detecting that the output signal of thefirst Hall effect sensor changes into a third signal and the outputsignal of the second Hall effect sensor changes into a fourth signal,where the second operation indication instruction is generated by theprotective case based on the third signal and the fourth signal, and isused to instruct the terminal to perform a second operation; and

sending a third operation indication instruction to the terminal inresponse to an operation of detecting that the output signal of thefirst Hall effect sensor changes into a fifth signal and the outputsignal of the second Hall effect sensor changes into a sixth signal,where the third operation indication instruction is generated by theprotective case based on the fifth signal and the sixth signal, and isused to instruct the terminal to perform a third operation, where

the first signal is an electrical signal output by the first Hall effectsensor when a magnetic field whose strength is not less than a firstmagnetic field strength passes through a working plane of the first Halleffect sensor from a first surface of the first Hall effect sensor, andthe second signal is an electrical signal output by the second Halleffect sensor when a magnetic field whose strength is not less than asecond magnetic field strength passes through a working plane of thesecond Hall effect sensor from a first surface of the second Hall effectsensor;

the third signal is an electrical signal output by the first Hall effectsensor when the magnetic field whose strength is not less than the firstmagnetic field strength passes through the working plane of the firstHall effect sensor from a second surface of the first Hall effectsensor, and the fourth signal is an electrical signal output by thesecond Hall effect sensor when the magnetic field whose strength is notless than the second magnetic field strength passes through the workingplane of the second Hall effect sensor from a second surface of thesecond Hall effect sensor; and

the fifth signal is an electrical signal output by the first Hall effectsensor when a magnetic field whose strength is less than the firstmagnetic field strength passes through the working plane of the firstHall effect sensor, and the sixth signal is an electrical signal outputby the second Hall effect sensor when a magnetic field whose strength isless than the second magnetic field strength passes through the workingplane of the second Hall effect sensor.

In an embodiment of the present invention, the first surface of thefirst Hall effect sensor and the second surface of the first Hall effectsensor are two opposite surfaces of the first Hall effect sensor, andboth the first surface of the first Hall effect sensor and the secondsurface of the first Hall effect sensor are parallel to the workingplane of the first Hall effect sensor; and

the first surface of the second Hall effect sensor and the secondsurface of the second Hall effect sensor are two opposite surfaces ofthe second Hall effect sensor, and both the first surface of the secondHall effect sensor and the second surface of the second Hall effectsensor are parallel to the working plane of the Hall effect sensor.

In an embodiment of the present invention, the protective case includesa base plate and a flip plate that are used to fasten the terminal, anda flip shaft that connects the base plate and the flip plate; and

the first Hall effect sensor and the second Hall effect sensor aredisposed in the flip plate, and the magnet is disposed in the terminalor the base plate of the protective case; or the first Hall effectsensor and the second Hall effect sensor are disposed in the base plate,and the magnet is disposed in the flip plate.

In an embodiment of the present invention, the magnet is a strip magnet,and the working plane of the first Hall effect sensor is parallel to theworking plane of the second Hall effect sensor; and

when the protective case is in a closed state, a connection line betweena north pole of the magnet and a south pole of the magnet is parallel tothe working plane of the first Hall effect sensor, and a distancebetween the first Hall effect sensor or the second Hall effect sensorand a projection of the strip magnet onto a plane on which the workingplane of the first Hall effect sensor is located is greater than a firstdistance threshold.

In an embodiment of the present invention, the magnet includes a firstmagnet and a second magnet, the first magnet generates the magneticfield whose strength is not less than the first magnetic field strength,and the second magnet generates the magnetic field whose strength is notless than the second magnetic field strength.

According to a fifth aspect, an embodiment of the present inventionfurther provides a terminal, including a processor and a memory, wherethe processor is connected to the memory, and the processor isconfigured to invoke program code in the memory to perform the followingstep:

performing a target operation in response to an operation of detectingthat an output signal of a first Hall effect sensor changes and anoutput signal of a second Hall effect sensor changes, where the firstHall effect sensor and the first Hall effect sensor output signals bysensing a magnetic field, where

the magnetic field is a magnetic field generated by a magnet built inthe terminal, or a magnetic field generated by a magnet built in aprotective case of the terminal.

In an embodiment of the present invention, that the processor performs atarget operation in response to an operation of detecting that an outputsignal of a first Hall effect sensor changes and an output signal of asecond Hall effect sensor changes specifically includes at least one ofthe following steps:

performing a first operation in response to an operation of detectingthat the output signal of the first Hall effect sensor changes into afirst signal and the output signal of the second Hall effect sensorchanges into a second signal;

performing a second operation in response to an operation of detectingthat the output signal of the first Hall effect sensor changes into athird signal and the output signal of the second Hall effect sensorchanges into a fourth signal; and

performing a third operation in response to an operation of detectingthat the output signal of the first Hall effect sensor changes into afifth signal and the output signal of the second Hall effect sensorchanges into a sixth signal, where

the first signal is an electrical signal output by the first Hall effectsensor when a magnetic field whose strength is not less than a firstmagnetic field strength passes through a working plane of the first Halleffect sensor from a first surface of the first Hall effect sensor, andthe second signal is an electrical signal output by the second Halleffect sensor when a magnetic field whose strength is not less than asecond magnetic field strength passes through a working plane of thesecond Hall effect sensor from a first surface of the second Hall effectsensor;

the third signal is an electrical signal output by the first Hall effectsensor when the magnetic field whose strength is not less than the firstmagnetic field strength passes through the working plane of the firstHall effect sensor from a second surface of the first Hall effectsensor, and the fourth signal is an electrical signal output by thesecond Hall effect sensor when the magnetic field whose strength is notless than the second magnetic field strength passes through the workingplane of the second Hall effect sensor from a second surface of thesecond Hall effect sensor; and

the fifth signal is an electrical signal output by the first Hall effectsensor when a magnetic field whose strength is less than the firstmagnetic field strength passes through the working plane of the firstHall effect sensor, and the sixth signal is an electrical signal outputby the second Hall effect sensor when a magnetic field whose strength isless than the second magnetic field strength passes through the workingplane of the second Hall effect sensor.

In an embodiment of the present invention, the first surface of thefirst Hall effect sensor and the second surface of the first Hall effectsensor are two opposite surfaces of the first Hall effect sensor, andboth the first surface of the first Hall effect sensor and the secondsurface of the first Hall effect sensor are parallel to the workingplane of the first Hall effect sensor; and

the first surface of the second Hall effect sensor and the secondsurface of the second Hall effect sensor are two opposite surfaces ofthe second Hall effect sensor, and both the first surface of the secondHall effect sensor and the second surface of the second Hall effectsensor are parallel to the working plane of the Hall effect sensor.

In an embodiment of the present invention, the first Hall effect sensorand the second Hall effect sensor are disposed in the protective case,and the processor includes a communications module; and beforeperforming the target operation, the processor is further configured toreceive, by using the communications module, an operation indicationinstruction sent by the protective case, where the operation indicationinstruction is an instruction that is generated by the protective casebased on a change of the output signal of the first Hall effect sensorand a change of the output signal of the second Hall effect sensor andthat is sent to the terminal, and is used to instruct the terminal toperform the target operation.

In an embodiment of the present invention, the magnet is a strip magnet,and the protective case includes a base plate and a flip plate that areused to fasten the terminal, and a flip shaft that connects the baseplate and the flip plate; and

the first Hall effect sensor and the second Hall effect sensor aredisposed in the flip plate of the protective case, and the strip magnetis disposed in the terminal or the base plate of the protective case; orthe strip magnet is disposed in the flip plate of the protective case,and the first Hall effect sensor and the second Hall effect sensor aredisposed in the terminal or the base plate of the protective case.

In an embodiment of the present invention, the magnet is a strip magnet,and the terminal includes a first body, a second body, and a flip shaftthat connects the first body and the second body; and

the first Hall effect sensor and the second Hall effect sensor aredisposed in the first body, and the strip magnet is disposed in thesecond body.

In an embodiment of the present invention, the working plane of thefirst Hall effect sensor is parallel to the working plane of the secondHall effect sensor; and

when the terminal is in a closed state, a connection line between anorth pole of the magnet and a south pole of the magnet is parallel tothe working plane of the first Hall effect sensor, and a distancebetween the first Hall effect sensor or the second Hall effect sensorand a projection of the strip magnet onto a plane on which the workingplane of the first Hall effect sensor is located is greater than a firstdistance threshold.

In an embodiment of the present invention, the magnet includes a firstmagnet and a second magnet, the first magnet generates the magneticfield whose strength is not less than the first magnetic field strength,and the second magnet generates the magnetic field whose strength is notless than the second magnetic field strength.

According to a sixth aspect, an embodiment of the present inventionfurther provides a protective case, including a base plate and a flipplate that are used to fasten the terminal, and a flip shaft thatconnects the base plate and the flip plate, where a status of theprotective case may change by using the flip shaft, where

a first Hall effect sensor and a second Hall effect sensor are disposedin the flip plate, and a magnet is disposed in the terminal or the baseplate; or a first Hall effect sensor and a second Hall effect sensor aredisposed in the base plate or the terminal, and the magnet is disposedin the flip plate;

the first Hall effect sensor and the first Hall effect sensor outputsignals by sensing a magnetic field; and

the protective case is configured to instruct, in response to a statuschange of the protective case, the terminal to perform a targetoperation based on a change of an output signal of the first Hall effectsensor and a change of an output signal of the second Hall effectsensor.

In an embodiment of the present invention, when the protective case isin a flip-up state, a magnetic field whose strength is not less than afirst magnetic field strength and that is generated by the magnet passesthrough a working plane of the first Hall effect sensor from the firstsurface, and the first Hall effect sensor outputs a first signal; and amagnetic field whose strength is not less than a second magnetic fieldstrength and that is generated by the magnet passes through a workingplane of the second Hall effect sensor from the first surface, and thesecond Hall effect sensor outputs a second signal;

when the protective case is in a flip-back state, the magnetic fieldwhose strength is not less than the first magnetic field strength andthat is generated by the magnet passes through the working plane of thefirst Hall effect sensor from the second surface, and the first Halleffect sensor outputs a third signal; and the magnetic field whosestrength is not less than the second magnetic field strength and that isgenerated by the magnet passes through the working plane of the secondHall effect sensor from the second surface, and the second Hall effectsensor outputs a fourth signal; and

when the protective case is in an expanded state, a magnetic field whosestrength is less than the first magnetic field strength and that isgenerated by the magnet passes through the working plane of the firstHall effect sensor, and the first Hall effect sensor outputs a fifthsignal; and a magnetic field whose strength is less than the secondmagnetic field strength and that is generated by the magnet passesthrough the working plane of the second Hall effect sensor, and thesecond Hall effect sensor outputs a sixth signal.

In an embodiment of the present invention, the first surface of thefirst Hall effect sensor and the second surface of the first Hall effectsensor are two opposite surfaces of the first Hall effect sensor, andboth the first surface of the first Hall effect sensor and the secondsurface of the first Hall effect sensor are parallel to the workingplane of the first Hall effect sensor; and

the first surface of the second Hall effect sensor and the secondsurface of the second Hall effect sensor are two opposite surfaces ofthe second Hall effect sensor, and both the first surface of the secondHall effect sensor and the second surface of the second Hall effectsensor are parallel to the working plane of the Hall effect sensor.

In an embodiment of the present invention, the magnet is a strip magnet,and the working plane of the first Hall effect sensor is parallel to theworking plane of the second Hall effect sensor; and

when the protective case is in a closed state, a connection line betweena north pole of the magnet and a south pole of the magnet is parallel tothe working plane of the first Hall effect sensor, and a distancebetween the first Hall effect sensor or the second Hall effect sensorand a projection of the strip magnet onto a plane on which the workingplane of the first Hall effect sensor is located is greater than a firstdistance threshold.

In an embodiment of the present invention, when the first Hall effectsensor and the second Hall effect sensor are disposed in the protectivecase, the protective case further includes a processor, a memory, and acommunications module, where the processor is connected to the memory,the first Hall effect sensor, the second Hall effect sensor, and thecommunications module, and the processor is configured to invoke programcode stored in the memory to perform the following step:

sending, by using the communications module, an operation indicationinstruction to the terminal in response to an operation of detectingthat the output signal of the first Hall effect sensor changes and theoutput signal of the second Hall effect sensor changes, where theoperation indication instruction is generated by the protective casebased on the change of the output signal of the first Hall effect sensorand the change of the output signal of the second Hall effect sensor,and is used to instruct the terminal to perform the target operation.

In an embodiment of the present invention, the sending, by using thecommunications module, an operation indication instruction to theterminal in response to an operation of detecting that the output signalof the first Hall effect sensor changes and the output signal of thesecond Hall effect sensor changes includes at least one of the followingsteps:

sending, by using the communications module, a first operationindication instruction to the terminal in response to an operation ofdetecting that the output signal of the first Hall effect sensor changesinto the first signal and the output signal of the second Hall effectsensor changes into the second signal, where the first operationindication instruction is generated by the protective case based on thefirst signal and the second signal, and is used to instruct the terminalto perform a first operation;

sending, by using the communications module, a second operationindication instruction to the terminal in response to an operation ofdetecting that the output signal of the first Hall effect sensor changesinto the third signal and the output signal of the second Hall effectsensor changes into the fourth signal, where the second operationindication instruction is generated by the protective case based on thethird signal and the fourth signal, and is used to instruct the terminalto perform a second operation; and

sending, by using the communications module, a third operationindication instruction to the terminal in response to an operation ofdetecting that the output signal of the first Hall effect sensor changesinto the fifth signal and the output signal of the second Hall effectsensor changes into the sixth signal, where the third operationindication instruction is generated by the protective case based on thefifth signal and the sixth signal, and is used to instruct the terminalto perform a third operation.

In an embodiment of the present invention, the magnet includes a firstmagnet and a second magnet, the first magnet generates the magneticfield whose strength is not less than the first magnetic field strength,and the second magnet generates the magnetic field whose strength is notless than the second magnetic field strength.

According to a seventh aspect, an embodiment of the present inventionprovides a computer storage medium, configured to store a computersoftware instruction used by the terminal described in the first aspect,where when the instruction is executed by the terminal, the terminalperforms the method according to the first aspect.

According to an eighth aspect, an embodiment of the present inventionprovides a computer storage medium, configured to store a computersoftware instruction used by the protective case described in the secondaspect, where when the instruction is executed by the protective case,the terminal performs the method according to the second aspect.

According to a ninth aspect, an embodiment of the present inventionprovides a computer program, where the program includes a computersoftware instruction, and when the instruction is executed by aterminal, the terminal performs the method according to the firstaspect.

According to a tenth aspect, an embodiment of the present inventionprovides a computer program, where the program includes a computersoftware instruction, and when the instruction is executed by theprotective case, the protective case performs the method according tothe second aspect.

BRIEF DESCRIPTION OF DRAWINGS

To describe the technical solutions in the embodiments of the presentinvention more clearly, the following briefly describes the accompanyingdrawings required for describing the embodiments or the prior art.

FIG. 1 is an illustrative schematic diagram of a working principle of aHall effect sensor according to an embodiment of the present invention;

FIG. 2 is a system framework diagram of a terminal control systemaccording to an embodiment of the present invention;

FIG. 3A is a cross-sectional schematic diagram of a protective case in aclosed state according to an embodiment of the present invention;

FIG. 3B is a cross-sectional schematic diagram of a protective case in ahalf-closed state according to an embodiment of the present invention;

FIG. 3C is a cross-sectional schematic diagram of a protective case in aflipped state according to an embodiment of the present invention;

FIG. 3D is a cross-sectional schematic diagram of a protective case in ahalf-flipped state according to an embodiment of the present invention;

FIG. 3E is a cross-sectional schematic diagram of a protective case inan expanded state according to an embodiment of the present invention;

FIG. 4A is an illustrative schematic diagram of a first positionrelationship between a magnet and a Hall effect sensor according to anembodiment of the present invention;

FIG. 4B is an illustrative schematic diagram of a second positionrelationship between a magnet and a Hall effect sensor according to anembodiment of the present invention;

FIG. 4C is a first illustrative schematic diagram of a first positionrelationship between a magnet and a Hall effect sensor according to anembodiment of the present invention;

FIG. 4D is a second illustrative schematic diagram of a first positionrelationship between a magnet and a Hall effect sensor according to anembodiment of the present invention;

FIG. 5A is a first illustrative schematic diagram of a second positionrelationship between a magnet and a Hall effect sensor according to anembodiment of the present invention;

FIG. 5B is a second illustrative schematic diagram of a second positionrelationship between a magnet and a Hall effect sensor according to anembodiment of the present invention;

FIG. 6 is a first illustrative schematic diagram of a positionrelationship between two magnets and two Hall effect sensors accordingto an embodiment of the present invention;

FIG. 7 is a second illustrative schematic diagram of a positionrelationship between two magnets and two Hall effect sensors accordingto an embodiment of the present invention;

FIG. 8A is a cross-sectional schematic diagram of a first structure of aterminal control system when a protective case is in a closed stateaccording to an embodiment of the present invention;

FIG. 8B is a cross-sectional schematic diagram of a second structure ofa terminal control system when a protective case is in a flipped stateaccording to an embodiment of the present invention;

FIG. 9A is a cross-sectional schematic diagram of a third structure of aterminal control system when a protective case is in a closed stateaccording to an embodiment of the present invention;

FIG. 9B is a cross-sectional schematic diagram of a fourth structure ofa terminal control system when a protective case is in a flipped stateaccording to an embodiment of the present invention;

FIG. 10 is a schematic structural diagram of a first terminal accordingto an embodiment of the present invention;

FIG. 11 is a schematic structural diagram of a second terminal accordingto an embodiment of the present invention;

FIG. 12 is a schematic structural diagram of a third terminal accordingto an embodiment of the present invention;

FIG. 13 is a schematic structural diagram of a protective case accordingto an embodiment of the present invention;

FIG. 14 is a schematic structural diagram of a flippable terminalaccording to an embodiment of the present invention;

FIG. 15 is a structural framework diagram of a flippable terminalaccording to an embodiment of the present invention;

FIG. 16A is a cross-sectional schematic diagram of a flippable terminalin a closed state according to an embodiment of the present invention;

FIG. 16B is a cross-sectional schematic diagram of a flippable terminalin a half-closed state according to an embodiment of the presentinvention;

FIG. 16C is a cross-sectional schematic diagram of a flippable terminalin a flipped state according to an embodiment of the present invention;

FIG. 16D is a cross-sectional schematic diagram of a flippable terminalin a half-flipped state according to an embodiment of the presentinvention;

FIG. 16E is a cross-sectional schematic diagram of a flippable terminalin an expanded state according to an embodiment of the presentinvention;

FIG. 17A is a cross-sectional schematic diagram of a first structure ofa flippable terminal in a closed state according to an embodiment of thepresent invention;

FIG. 17B is a cross-sectional schematic diagram of a first structure ofa flippable terminal in a flipped state according to an embodiment ofthe present invention;

FIG. 18A is a cross-sectional schematic diagram of a second structure ofa flippable terminal when the flippable terminal is in a closed stateaccording to an embodiment of the present invention;

FIG. 18B is a cross-sectional schematic diagram of a second structure ofa flippable terminal when the flippable terminal is in a flipped stateaccording to an embodiment of the present invention;

FIG. 19A is a cross-sectional schematic diagram of a third structure ofa flippable terminal when the flippable terminal is in a closed stateaccording to an embodiment of the present invention;

FIG. 19B is a cross-sectional schematic diagram of a third structure ofa flippable terminal when the flippable terminal is in a flipped stateaccording to an embodiment of the present invention;

FIG. 20 is a schematic flowchart of a terminal control method accordingto an embodiment of the present invention;

FIG. 21 is a schematic flowchart of another terminal control methodaccording to an embodiment of the present invention;

FIG. 22 is a schematic structural diagram of a fourth terminal accordingto an embodiment of the present invention; and

FIG. 23 is a schematic structural diagram of another protective caseaccording to an embodiment of the present invention.

DESCRIPTION OF EMBODIMENTS

The following clearly describes the technical solutions in theembodiments of the present invention with reference to the accompanyingdrawings in the embodiments of the present invention.

Referring to FIG. 1, FIG. 1 is an illustrative schematic diagram of aworking principle of a Hall effect sensor according to an embodiment ofthe present invention. As shown in FIG. 1, a Hall effect sensor 101includes a semiconductor wafer made of a semiconductor material, and aworking plane of the Hall effect sensor is a plane of the Hall effectsensor for sensing a magnetic field, namely, a plane on which thesemiconductor wafer is located. When the Hall effect sensor 101operates, if a current is applied to the semiconductor wafer, and amagnetic field is applied in a vertical direction of the wafer, thewafer has an electric potential difference in a direction that isvertical to the current and the magnetic field. For example, when themagnetic field passes through the Hall effect sensor 101 from a firstsurface (an upper surface) 1011 of the Hall effect sensor, a firstoutput end 102 of the Hall effect sensor outputs a low-level signal, anda second output end 103 outputs a high-level signal; on the contrary,when the magnetic field passes through the Hall effect sensor from asecond surface (a lower surface) 1012 of the Hall effect sensor, thefirst output end 102 of the Hall effect sensor outputs a high-levelsignal, and the second output end 103 outputs a low-level signal. Arelative position relationship between a magnet that generates themagnetic field and the Hall effect sensor may be determined by usingdifferent outputs of the first output end 102 and the second output end103.

It should be noted that in FIG. 1, the Hall effect sensor including twovoltage signal output ends is used as an example to describe the workingprinciple of the Hall effect sensor. In this embodiment of the presentinvention, alternatively, the Hall effect sensor may include one outputend, three output ends, or the like. An output signal of each output endmay be a voltage signal or a current signal, and this is not limited inthe present invention. When the magnetic field passes through theworking plane of the Hall effect sensor, an output end of the Halleffect sensor outputs an electrical signal in a voltage or current form.When the magnetic field passes through the working plane of the Halleffect sensor from different directions, different electrical signalsare output. The different electrical signals are used to instruct aprocessor of a terminal to perform different operations, so as toimplement control over the terminal.

Referring to FIG. 2, FIG. 2 is a system framework diagram of a terminalcontrol system according to an embodiment of the present invention. Anembodiment of a terminal control method in the present invention may beimplemented based on a structural framework diagram of the terminalcontrol system. The terminal control system shown in FIG. 2 may includea terminal 21 and a protective case 22. FIG. 2 is a schematic diagram ofpositions of the protective case 22 and the terminal 21 in the terminalcontrol system when the protective case 22 is in an operating state (inother words, the terminal 21 is disposed in the protective case 22). Theprotective case 22 may include a base plate 221 and a flip plate 222that are used to fasten the terminal 21, and a flip shaft 223 thatconnects the base plate 221 and the flip plate 222. Optionally, the baseplate 221, the flip plate 222, and the flip shaft 223 may be integratedtogether. A first Hall effect sensor and a second Hall effect sensor aredisposed in the base plate 221 or the terminal 21, and a magnet isdisposed in the flip plate 222; or a first Hall effect sensor and asecond Hall effect sensor are disposed in the flip plate 222, and amagnet is disposed in the base plate 221 or the terminal 21.

A status of the protective case 22 may include a flip-up state, anexpanded state, and a flip-back state.

It may be understood that the flip-up state of the protective case 22includes a closed state of the protective case 22 and a half-closedstate of the protective case 22.

The closed state of the protective case 22 is a state in which the flipplate 222 of the protective case 22 covers the terminal 21 fastened onthe base plate 221, and a plane on which the flip plate 222 is locatedis parallel to a plane on which the base plate 221 is located. Referringto FIG. 3A, FIG. 3A is a cross-sectional schematic diagram of aprotective case in a closed state according to an embodiment of thepresent invention. When the protective case 22 operates, the flip plate222 of the protective case 22 in the closed state covers the terminal 21fastened on the base plate 221.

The half-closed state of the protective case 22 is a state in which afirst included angle is formed between the flip plate 222 of theprotective case 22 and a plane that is of the terminal 21 fastened onthe base plate 221 and that is away from the base plate 221, and thefirst included angle is less than a first angle threshold. The firstangle threshold is a maximum included angle when a magnetic fieldgenerated by the magnet can trigger the first Hall effect sensor tooutput a first signal and the second Hall effect sensor to output asecond signal. Referring to FIG. 3B, FIG. 3B is a cross-sectionalschematic diagram of a protective case in a half-closed state accordingto an embodiment of the present invention. When the protective case 22operates, a first included angle 301 is formed between the flip plate222 of the protective case 22 in the half-closed state and the baseplate 221 on which the terminal 21 is fastened.

It may be understood that the flip-back state of the protective case 22includes a flipped state of the protective case 22 and a half-flippedstate of the protective case 22.

The flipped state of the protective case 22 is a state in which the flipplate 222 of the protective case 22 is located under the base plate 221,and the plane on which the flip plate 222 is located is parallel to theplane on which the base plate 221 is located. Referring to FIG. 3C, FIG.3C is a cross-sectional schematic diagram of a protective case in aflipped state according to an embodiment of the present invention. Whenthe protective case 22 operates, the flip plate 222 of the protectivecase 22 in the flipped state faces away from the base plate 221 on whichthe terminal 21 is fastened.

The half-flipped state of the protective case 22 is a state in which asecond included angle 225 is formed between the flip plate 222 of theprotective case 22 and a plane that is of the base plate 221 and that isaway from the terminal 21 fastened on the base plate 221, and the secondincluded angle is less than a second angle threshold. In an embodimentof the present invention, the second angle threshold is a maximumincluded angle when the first Hall effect sensor can be triggered tooutput a third signal and the second Hall effect sensor can be triggeredto output a fourth signal. Referring to FIG. 3D, FIG. 3D is across-sectional schematic diagram of a protective case in a half-flippedstate according to an embodiment of the present invention. When theprotective case 22 operates, the flip plate 222 of the protective case22 in the half-flipped state faces away from the base plate 221 on whichthe terminal 21 is fastened, and therefore a second included angle 302is formed.

It may be understood that the protective case 22 may further include theexpanded state. Referring to FIG. 3E, FIG. 3E is a cross-sectionalschematic diagram of a protective case in an expanded state according toan embodiment of the present invention. In this case, a third includedangle 303 is formed between the flip plate 222 of the protective case 22and the plane that is of the terminal 21 fastened on the base plate 221and that is away from the base plate 221, and the third included angle303 is greater than the first angle threshold. In an embodiment of thepresent invention, the third included angle 303 is greater than thefirst angle threshold and less than a difference between 3600 and thesecond included angle.

When the protective case 22 is in the flip-up state, a magnetic fieldwhose strength is not less than a first magnetic field strength and thatis generated by the magnet passes through a working plane of the firstHall effect sensor from a first surface of the first Hall effect sensor,and the first Hall effect sensor outputs the first signal; and amagnetic field whose strength is not less than a second magnetic fieldstrength and that is generated by the magnet passes through a workingplane of the second Hall effect sensor from a first surface of thesecond Hall effect sensor, and the second Hall effect sensor outputs thesecond signal.

When the protective case 22 is in the flip-back state, the magneticfield whose strength is not less than the first magnetic field strengthand that is generated by the magnet passes through the working plane ofthe first Hall effect sensor from a second surface of the first Halleffect sensor, and the first Hall effect sensor outputs the thirdsignal; and the magnetic field whose strength is not less than thesecond magnetic field strength and that is generated by the magnetpasses through the working plane of the second Hall effect sensor from asecond surface of the second Hall effect sensor, and the second Halleffect sensor outputs the fourth signal.

When the protective case 22 is in the expanded state, a magnetic fieldwhose strength is less than the first magnetic field strength and thatis generated by the magnet passes through the working plane of the firstHall effect sensor from the first surface or the second surface of thefirst Hall effect sensor, and the first Hall effect sensor outputs afifth signal; and a magnetic field whose strength is less than thesecond magnetic field strength and that is generated by the magnetpasses through the working plane of the second Hall effect sensor fromthe first surface or the second surface of the second Hall effectsensor, and the second Hall effect sensor outputs a sixth signal. It maybe understood that when the protective case 22 is in the expanded state,a strength of a magnetic field that acts on the first Hall effect sensoris less than the first magnetic field strength, and may also be 0; and astrength of a magnetic field that acts on the second Hall effect sensoris less than the second magnetic field strength, and may also be 0.

In an embodiment of the present invention, the first surface of thefirst Hall effect sensor and the second surface of the first Hall effectsensor may be a same surface of the first Hall effect sensor, and thesurface is parallel to the working plane of the first Hall effectsensor. The first surface of the second Hall effect sensor and thesecond surface of the second Hall effect sensor may be a same surface ofthe second Hall effect sensor, and the surface is parallel to theworking plane of the second Hall effect sensor.

In this case, the first signal is the same as the third signal, thefirst signal is different from the fifth signal, the second signal isthe same as the fourth signal, and the second signal is different fromthe sixth signal.

In this case, a relative position relationship between the magnet andthe Hall effect sensors may be: When the protective case is in theclosed state, a connection line between a north pole and a south pole ofthe magnet is vertical to both the working plane of the first Halleffect sensor and the working plane of the second Hall effect sensor.

When it is detected that an output signal of the first Hall effectsensor changes into the first signal and an output signal of the secondHall effect sensor changes into the second signal, it indicates that theprotective case 22 changes from the expanded state to the flip-up stateor the flip-back state. In this case, the terminal 21 may perform afirst operation such as a screen off operation.

When it is detected that the output signal of the first Hall effectsensor changes into the fifth signal and the output signal of the secondHall effect sensor changes into the sixth signal, it indicates that theprotective case 22 changes into the expanded state. In this case, theterminal 21 may perform a third operation such as a screen wakeupoperation.

It may be understood that a protective case manufacturer may not know aquantity of Hall effect sensors in the terminal, positions of the Halleffect sensors, or a terminal control method used by the terminal. If asingle Hall effect sensor is used, a limitation to relative positions ofthe magnet and the Hall effect sensor is relatively low, and a positionfor which the Hall effect sensor can respond may be explored by usingthe magnet and a response status of the terminal, but the exploredposition is not an optimal position. Consequently, control of theprotective case over the terminal may be insensitive, and therefore auser of the terminal mistakenly considers that the terminal has a poorcapability of sensing the protective case. When the terminal controlsystem includes two Hall effect sensors, a position of the magnet needsto meet response requirements for the two Hall effect sensors toimplement control over the terminal. Therefore, to implement a terminalcontrol function, a limitation to relative positions of the magnet andthe Hall effect sensors is relatively high. In addition, the position ofthe magnet in the protective case that implements the terminal controlfunction can be a better position, so as to improve sensitivity ofcontrol of the protective case over the terminal.

In an embodiment of the present invention, the first surface of thefirst Hall effect sensor and the second surface of the first Hall effectsensor are two opposite surfaces of the first Hall effect sensor, andboth the first surface of the first Hall effect sensor and the secondsurface of the first Hall effect sensor are parallel to the workingplane of the first Hall effect sensor; and the first surface of thesecond Hall effect sensor and the second surface of the second Halleffect sensor are two opposite surfaces of the second Hall effectsensor, and both the first surface of the second Hall effect sensor andthe second surface of the second Hall effect sensor are parallel to theworking plane of the Hall effect sensor. In this case, the first signaland third signal have opposite polarities, both the first signal and thethird signal are different from the fifth signal, the second signal andthe fourth signal have opposite polarities, and both the second signaland the fourth signal are different from the sixth signal. Therefore, amisoperation of the terminal is avoided, and user experience isimproved.

In this case, a relative position relationship between the magnet andthe Hall effect sensors may be: When the protective case is in theclosed state, a connection line between a north pole and a south pole ofthe magnet is parallel to both the working plane of the first Halleffect sensor and the working plane of the second Hall effect sensor.

When it is detected that an output signal of the first Hall effectsensor changes into the first signal and an output signal of the secondHall effect sensor changes into the second signal, it indicates that theprotective case 22 changes from the expanded state to the flip-up state.In this case, the terminal 21 may perform a first operation.

When it is detected that the output signal of the first Hall effectsensor changes into the third signal and the output signal of the secondHall effect sensor changes into the fourth signal, it indicates that theprotective case 22 changes from the expanded state to the flip-backstate. In this case, the terminal 21 may perform a second operation.

When it is detected that the output signal of the first Hall effectsensor changes from the first signal to the fifth signal and the outputsignal of the second Hall effect sensor changes from the second signalto the sixth signal, it indicates that the protective case 22 changesfrom the flip-up state to the expanded state. In this case, the terminal21 may perform a third operation.

When it is detected that the output signal of the first Hall effectsensor changes from the third signal to the fifth signal and the outputsignal of the second Hall effect sensor changes from the fourth signalto the sixth signal, it indicates that the protective case 22 changesfrom the flip-back state to the expanded state. In this case, theterminal 21 may perform a fourth operation.

The first Hall effect sensor or the second Hall effect sensor mayinclude at least one output end, an output signal of the output end isan electrical signal, and the electrical signal may be a voltage signalor a current signal.

Optionally, each of the first Hall effect sensor and the second Halleffect sensor includes two output ends, for example, the first outputend and the second output end shown in FIG. 1, and output signals arevoltage signals. A polarity of an output electrical signal of the firstoutput end when the protective case 22 is in the flip-up state isopposite to that of an output electrical signal of the first output endwhen the protective case 22 is in the flip-back state. Likewise, apolarity of an output electrical signal of the second output end whenthe protective case 22 is in the flip-up state is opposite to that of anoutput electrical signal of the second output end when the protectivecase 22 is in the flip-back state.

For example, the first signal may mean that a first output end of thefirst Hall effect sensor outputs a high-level signal and a second outputend of the first Hall effect sensor outputs a low-level signal, and thesecond signal may mean that a first output end of the second Hall effectsensor outputs a low-level signal and a second output end of the secondHall effect sensor outputs a high-level signal; the third signal maymean that the first output end of the first Hall effect sensor outputs alow-level signal and the second output end of the first Hall effectsensor outputs a high-level signal, and the fourth signal may mean thatthe first output end of the second Hall effect sensor outputs ahigh-level signal and the second output end of the second Hall effectsensor outputs a low-level signal; and the fifth signal may mean thatboth the first output end and the second output end of the first Halleffect sensor output high-level signals or low-level signals, and thesixth signal may mean that both the first output end and the secondoutput end of the second Hall effect sensor output high-level signals orlow-level signals.

It may be understood that a direction of a magnetic field that passesthrough the working plane of the first Hall effect sensor when theprotective case 22 is in the closed state is different from a directionof a magnetic field that passes through the working plane of the firstHall effect sensor when the protective case 22 is in the flipped state.Therefore, the first Hall effect sensor outputs different electricalsignals in the two states, and likewise, the second Hall effect sensoroutputs different electrical signals in the two states. In this way, thefollowing problem in the prior art can be avoided: Directions of amagnetic field that passes through a working plane of a Hall effectsensor are the same when the protective case 22 is in the closed stateand the flipped state, and therefore, the Hall effect sensor outputs asame electrical signal, and the terminal 21 performs a screen lockingoperation regardless of whether the protective case 22 is in the closedstate and the flipped state, causing a misoperation of the terminal 21when the protective case 22 is in the flipped state.

In this embodiment of the present invention, the magnet may be a stripmagnet, and through setting, the connection line between the north poleand the south pole of the magnet may be parallel to both the workingplane of the first Hall effect sensor and the working plane of thesecond Hall effect sensor when the protective case 22 is in the closedstate. Therefore, directions of a magnetic field that passes through aworking plane of a Hall effect sensor are different when the protectivecase 22 is in the closed state and the flipped state. In this way, amisoperation of the terminal 21 is avoided, and the closed state and theflipped state of the protective case can be distinguished from eachother, thereby implementing precise control over the terminal 21 andimproving user experience.

It should be noted that the terminal 21 may include but is not limitedto a mobile computer, a tablet computer, a mobile phone, a personaldigital assistant (Personal Digital Assistant, PDA), a media player, andthe like.

It may be understood that when the terminal control system includes oneHall effect sensor, positions of the Hall effect sensor and the magnetmay be set, so that a working plane of the Hall effect sensor isparallel to the connection line between the north pole and the southpole of the magnet when the protective case is in the closed state,thereby avoiding a misoperation of the terminal that is caused by aposition setting manner of a conventional protective case for a Halleffect sensor and a magnet. To be specific, a working plane of the Halleffect sensor is vertical to a connection line between a north pole anda south pole of the magnet when the conventional protective case is in aclosed state, and when the conventional protective case is in the closedstate and a flipped state, output signals of the Hall effect sensor thatare detected by a terminal may be the same, and the terminal istriggered to perform a same operation such as a screen locking operationwhen the protective case performs a forward snap-fit operation (to bespecific, a flip plate of the protective case covers the terminal on abase plate of the protective case) and a backward snap-fit operation (tobe specific, the flip plate of the protective case is rotated to a backsurface of the base plate of the protective case), causing amisoperation of the terminal when the protective case performs thebackward snap-fit operation. In this embodiment of the presentinvention, through setting, a working plane of at least one Hall effectsensor is parallel to the connection line between the north pole and thesouth pole of the magnet, so that signals output by each of the two Halleffect sensors are inconsistent when the protective case is in theclosed state and the flipped state, and a forward snap-fit operation anda backward snap-fit operation of the protective case are identified,thereby improving user experience.

However, the protective case manufacturer may not know a position of aHall effect sensor in the terminal or a terminal control method used bythe terminal, and the position of the Hall effect sensor may be exploredby using the magnet and a response status of the terminal. When aconventional protective case is configured for the terminal, theterminal still responds to a forward snap-fit operation and a backwardsnap-fit operation of the protective case in a conventional manner.Consequently, the terminal performs a same operation in response to theforward snap-fit operation and the backward snap-fit operation of theprotective case, and the user mistakenly considers that the terminal isfaulty.

In the embodiment of the present invention, two Hall effect sensors aredisposed, and when the protective case manufacturer does not know aterminal control method used by the terminal, positions of the Halleffect sensors can hardly be explored by using the magnet. In this case,the protective case manufacturer may make it more difficult to generatea protective case that matches the terminal, so that an unmatchedprotective case is prevented from being applied to the terminal, and theterminal responds only when a magnet setting manner meets outputrequirements of the terminal for both the first Hall effect sensor andthe second Hall effect sensor. In this case, the magnet setting mannercan fit the terminal control method, and a protective case produced inthe magnet setting manner can match the terminal control method. Inaddition, the terminal for which the matched protective case isconfigured can identify a forward snap-fit operation and a backwardsnap-fit operation of the protective case, so as to avoid a misoperationof the terminal, implement precise control over the terminal, andimprove user experience.

In an embodiment of the present invention, the first operation mayinclude one of a screen locking operation, a sleep operation, and ascreen off operation, the second operation may be no operation, and thethird operation may be a screen wakeup operation. In this embodiment ofthe present invention, the following can be achieved: The terminalperforms a sleep operation when detecting a forward snap-fit operationof the protective case; the terminal performs a screen wakeup operationwhen detecting an operation of opening the protective case; and theterminal may perform no operation when detecting a backward snap-fitoperation of the protective case. It should be noted that alternatively,the first operation, the second operation, and the third operation maybe other operations, and this is not limited in the present invention.

Positions of a Hall effect sensor and a magnet may be set in thefollowing manners:

First setting manner for a Hall effect sensor and a magnet: The magnetis disposed in the flip plate 222, and the first Hall effect sensor andthe second Hall effect sensor are disposed in the terminal 21.

Second setting manner for a Hall effect sensor and a magnet: The magnetis disposed in the flip plate 222, and the first Hall effect sensor andthe second Hall effect sensor are disposed in the base plate 221.

Third setting manner for a Hall effect sensor and a magnet: The magnetis disposed in the flip plate 222, the first Hall effect sensor isdisposed in the base plate 221, and the second Hall effect sensor isdisposed in the terminal 21.

Fourth setting manner for a Hall effect sensor and a magnet: The firstHall effect sensor and the second Hall effect sensor are disposed in theflip plate 222, and the magnet is disposed in the terminal 21.

Fifth setting manner for a Hall effect sensor and a magnet: The firstHall effect sensor and the second Hall effect sensor are disposed in theflip plate 222, and the magnet is disposed in the base plate 221.

Optionally, there may be one magnet, and the magnet is disposed betweenthe first Hall effect sensor and the second Hall effect sensor when theprotective case is in the closed state; or there may be two magnetsincluding a first magnet and a second magnet, the first magnet mainlyacts on the first Hall effect sensor, and the second Hall effect sensormainly acts on the second Hall effect sensor.

It should be noted that a distance between the first Hall effect sensorand the second Hall effect sensor may be 10 mm to 50 mm, and a length ofthe magnet may be 5 mm to 40 mm. For example, the distance between thefirst Hall effect sensor and the second Hall effect sensor may be 20 mm,and the length of the magnet is 10 mm.

The following describes a relative position relationship between themagnet, the first Hall effect sensor, and the second Hall effect sensorby using the first setting manner for a Hall effect sensor and a magnetas an example.

In an embodiment of the present invention, when the protective case isin the closed state, the connection line between the north pole of themagnet and the south pole of the magnet may be vertical to the workingplane of the first Hall effect sensor and/or the working plane of thesecond Hall effect sensor.

Referring to FIG. 4A, and FIG. 4B, FIG. 4A is an illustrative schematicdiagram of a first position relationship between a magnet and a Halleffect sensor according to an embodiment of the present invention, andFIG. 4B is an illustrative schematic diagram of a second positionrelationship between a magnet and a Hall effect sensor according to anembodiment of the present invention. FIG. 4A and FIG. 4B arecross-sectional diagrams of a terminal control system when a protectivecase 42 is in a closed state.

As shown in FIG. 4A, a magnet 43 is disposed in a flip plate 422 of theprotective case 42, a connection line between a north pole and a southpole of the magnet 43 may be vertical to a plane on which the flip plate422 is located, and both a working plane of a first Hall effect sensor44 and a working plane of a second Hall effect sensor 45 may be parallelto a plane on which a terminal 41 is located.

As shown in FIG. 4B, a magnet includes a first magnet 431 and a secondmagnet 432, both a connection line between a north pole and a south poleof the first magnet 431 and a connection line between a north pole and asouth pole of the second magnet 432 may be vertical to the plane onwhich the flip plate 422 is located, and both the working plane of thefirst Hall effect sensor 44 and the working plane of the second Halleffect sensor 45 may be vertical to the plane on which the terminal 41is located.

In an embodiment of the present invention, when the protective case isin the closed state, the connection line between the north pole of themagnet and the south pole of the magnet may be parallel to the workingplane of the first Hall effect sensor and/or the working plane of thesecond Hall effect sensor.

Optionally, the connection line between the north pole of the magnet andthe south pole of the magnet may be parallel to the plane on which theflip plate is located. When the protective case is in the closed state,the plane on which the flip plate is located is parallel to the plane onwhich the base plate is located and the plane on which the terminal islocated, and the working plane of the first Hall effect sensor and theworking plane of the second Hall effect sensor may be parallel to theplane on which the flip plate is located. A distance between the firstHall effect sensor and a projection of the magnet onto the plane onwhich the terminal is located is greater than a first distancethreshold, and a distance between the second Hall effect sensor and aprojection of the magnet onto the plane on which the terminal is locatedis greater than a second distance threshold. The first distancethreshold is a minimum distance between the projection of the magnetonto the plane on which the terminal is located and the first Halleffect sensor when the Hall effect sensor can output the first signaland the third signal. The second distance threshold is a minimumdistance between the projection of the magnet onto the plane on whichthe terminal is located and the second Hall effect sensor when the Halleffect sensor can output the second signal and the fourth signal. Thefirst distance threshold or the second distance threshold is usuallygreater than 0. The first distance threshold or the second distancethreshold is related to distribution of magnetic field strengths of themagnet and a parameter of the Hall effect sensor, for example, a Hallcoefficient of a material, a thickness of the material, and intensity ofa current. Optionally, due to the first distance threshold or the seconddistance threshold, a value of a strength of a magnetic field thatpasses through a working plane of a Hall effect sensor can be not lessthan 0.8 mT to 3.4 mT when the protective case is in the closed state orthe flipped state.

Referring to FIG. 4C and FIG. 4D, FIG. 4C is a first illustrativeschematic diagram of a first position relationship between a magnet anda Hall effect sensor according to an embodiment of the presentinvention, and FIG. 4D is a second illustrative schematic diagram of afirst position relationship between a magnet and a Hall effect sensoraccording to an embodiment of the present invention. FIG. 4C is across-sectional diagram of the terminal control system when theprotective case 42 is in the closed state, and FIG. 4D is a top view ofthe terminal control system when the protective case 42 is in the closedstate. The magnet 43 is disposed in the flip plate 422, and theconnection line between the north pole of the magnet 43 and the southpole of the magnet 43 may be parallel to the plane on which the flipplate 422 is located. The first Hall effect sensor 44 and the secondHall effect sensor 45 are disposed in the terminal 41, and both theworking plane of the first Hall effect sensor and the working plane ofthe second Hall effect sensor are parallel to a plane on which a baseplate 421 is located. A distance d1 between the first Hall effect sensorand a projection of the magnet onto the plane on which the flip plate422 is located is greater than the first distance threshold, and adistance d2 between the second Hall effect sensor and a projection ofthe magnet onto the plane on which the flip plate 422 is located isgreater than the second distance threshold.

Optionally, the connection line between the north pole of the magnet andthe south pole of the magnet may be vertical to the plane on which theflip plate is located. When the protective case is in the closed state,the plane on which the flip plate is located is parallel to the plane onwhich the base plate is located and the plane on which the terminal islocated. The working plane of the first Hall effect sensor and theworking plane of the second Hall effect sensor may be vertical to theplane on which the flip plate is located. A distance between the firstHall effect sensor and a projection of the magnet onto the plane onwhich the terminal is located is greater than a third distancethreshold, and a distance between the second Hall effect sensor and aprojection of the magnet onto the plane on which the terminal is locatedis greater than a fourth distance threshold. The third distancethreshold is a minimum distance between the projection of the magnetonto the plane on which the terminal is located and the first Halleffect sensor when the Hall effect sensor can output the first signaland the third signal. The fourth distance threshold is a minimumdistance between the projection of the magnet onto the plane on whichthe terminal is located and the second Hall effect sensor when the Halleffect sensor can output the second signal and the fourth signal. Thethird distance threshold or the fourth distance threshold is usuallygreater than 0. The third distance threshold or the fourth distancethreshold is related to distribution of magnetic field strengths of themagnet and a parameter of the Hall effect sensor, for example, a Hallcoefficient of a material, a thickness of the material, and intensity ofa current. Optionally, due to the third distance threshold or the fourthdistance threshold, a value of a strength of a magnetic field thatpasses through a working plane of a Hall effect sensor can be not lessthan 0.8 mT to 3.4 mT when the protective case is in the closed state orthe flipped state.

Referring to FIG. 5A and FIG. 5B, FIG. 5A is a first illustrativeschematic diagram of a second position relationship between a magnet anda Hall effect sensor according to an embodiment of the presentinvention, and FIG. 5B is a second illustrative schematic diagram of asecond position relationship between a magnet and a Hall effect sensoraccording to an embodiment of the present invention. FIG. 5A is across-sectional diagram when a protective case 52 is in a closed state,and FIG. 5B is a top view when the protective case 52 is in the closedstate. A magnet 53 is disposed in a flip plate 522, and a connectionline between a north pole of the magnet 53 and a south pole of themagnet 53 may be vertical to a plane on which the flip plate 522 islocated. A first Hall effect sensor and a second Hall effect sensor aredisposed in a terminal 51, and both a working plane of the first Halleffect sensor and a working plane of the second Hall effect sensor arevertical to a plane on which a base plate 521 is located. A distance d3between the first Hall effect sensor and a projection of the magnet ontoa plane on which the terminal 51 is located is greater than a thirddistance threshold, and a distance d4 between the second Hall effectsensor and a projection of the magnet onto the plane on which theterminal 51 is located is greater than a fourth distance threshold.

It should be noted that, when the first Hall effect sensor can outputthe first signal and the third signal and the second Hall effect sensorcan output the second signal and the fourth signal, an angle may beformed between the working plane of the first Hall effect sensor and/orthe working plane of the second Hall effect sensor and the plane onwhich the terminal is located, and/or an angle is formed between theconnection line between the north pole of the magnet and the south poleof the magnet and the plane on which the flip plate is located, so thatwhen the protective case is in the closed state, an angle is formedbetween the working plane of the first Hall effect sensor and/or theworking plane of the second Hall effect sensor and the connection linebetween the north pole of the magnet and the south pole of the magnet.

For example, a relative position relationship between the magnet, thefirst Hall effect sensor, and the second Hall effect sensor may be thatbetween the magnet 43, the first Hall effect sensor 401, and the secondHall effect sensor 402 shown in FIG. 4B, and is not limited in thepresent invention.

For another example, a relative position relationship between themagnet, the first Hall effect sensor, and the second Hall effect sensormay be that between the magnet 53, the first Hall effect sensor 501, andthe second Hall effect sensor 502 shown in FIG. 5B, and is not limitedin the present invention.

In an embodiment of the present invention, the terminal or theprotective case may further include a plurality of magnets, and theplurality of magnets jointly or separately act on the first Hall effectsensor and the second Hall effect sensor. Referring to FIG. 6, FIG. 6 isa first illustrative schematic diagram of a position relationshipbetween two magnets and two Hall effect sensors according to anembodiment of the present invention.

In FIG. 6, one magnet is added on the basis of FIG. 4A. A first magnet63 and a second magnet 66 are disposed in a flip plate 622, and aconnection line between a north pole of the first magnet 63 and a southpole of the first magnet 63 and a connection line between a north poleof the second magnet 66 and a south pole of the second magnet 66 may beparallel to a plane on which the flip plate 622 is located. A first Halleffect sensor 64 and a second Hall effect sensor 65 are disposed in aterminal 61, and both a working plane of the first Hall effect sensor 64and a working plane of the second Hall effect sensor 65 are parallel toa plane on which a base plate 621 is located. The first magnet 63 mainlyacts on the first Hall effect sensor 64, and the second magnet 66 mainlyacts on the second Hall effect sensor 65. A distance d1 between thefirst Hall effect sensor and a projection of the first magnet 63 ontothe plane on which the flip plate 622 is located is greater than a firstdistance threshold, and a distance d2 between the second Hall effectsensor 66 and a projection of the second magnet 66 onto the plane onwhich the flip plate 622 is located is greater than a second distancethreshold.

Referring to FIG. 7, FIG. 7 is a second illustrative schematic diagramof a position relationship between two magnets and two Hall effectsensors according to an embodiment of the present invention. In FIG. 7,one magnet is added on the basis of FIG. 5A. A connection line between anorth pole of a first magnet 73 and a south pole of the first magnet 73may be vertical to a plane on which a flip plate 722 is located, and aconnection line between a north pole of a second magnet 76 and a southpole of the second magnet 76 may be vertical to the plane on which theflip plate 722 is located. When a protective case 72 is in a closedstate, the plane on which the flip plate 722 is located is parallel to aplane on which a base plate 721 is located and a plane on which aterminal 71 is located.

The first magnet 73 and the second magnet 76 are disposed in the flipplate 722, and both the connection line between the north pole of thefirst magnet 73 and the south pole of the first magnet 73 and theconnection line between the north pole of the second magnet 76 and thesouth pole of the second magnet 76 may be vertical to the plane on whichthe flip plate 722 is located. A first Hall effect sensor 74 and asecond Hall effect sensor 75 are disposed in the terminal 71, and both aworking plane of the first Hall effect sensor 74 and a working plane ofthe second Hall effect sensor 75 are vertical to the plane on which thebase plate 721 is located. The first magnet 73 mainly acts on the firstHall effect sensor 74, and the second magnet 76 mainly acts on thesecond Hall effect sensor 75. A distance d3 between the first Halleffect sensor 74 and a projection of the first magnet 73 onto the planeon which the flip plate 722 is located is greater than a third distancethreshold, and a distance d4 between the second Hall effect sensor 75and a projection of the second magnet 76 onto the plane on which theflip plate 722 is located is greater than a fourth distance threshold.For descriptions of the third distance threshold or the fourth distancethreshold, refer to the related descriptions in the foregoingembodiment. Details are not described again in the present invention.

It should be noted that for descriptions of the first distance thresholdor the second distance threshold, refer to the related descriptions inthe foregoing embodiment. Details are not described again in the presentinvention.

It should be further noted that, when the first Hall effect sensor canoutput the first signal and the third signal and the second Hall effectsensor can output the second signal and the fourth signal, a relativeposition relationship between the first magnet, the second magnet, thefirst Hall effect sensor, and the second Hall effect sensor may haveanother form. For example, when the protective case is in the closedstate, an angle is formed between the working plane of the first Halleffect sensor and a connection line between a north pole and a southpole of the first magnet, and/or an angle is formed between the workingplane of the second Hall effect sensor and a connection line between anorth pole and a south pole of the second magnet.

It should be further noted that, in any other setting manner for a Halleffect sensor and a magnet, for the relative position relationshipbetween the magnet, the first Hall effect sensor, and the second Halleffect sensor, refer to any setting manner for the relative positionrelationship in FIG. 4C, FIG. 4D, FIG. 5A, FIG. 5B, FIG. 6, and FIG. 7,and details are not described again in the present invention.

The following describes a principle of a terminal control method byusing, as an example, a relative position relationship between themagnet, the first Hall effect sensor, and the second Hall effect sensorshown in FIG. 4C in the first setting manner for a Hall effect sensorand a magnet.

Referring to FIG. 8A and FIG. 8B, FIG. 8A is a cross-sectional schematicdiagram of a first structure of a terminal control system when aprotective case is in a closed state according to an embodiment of thepresent invention, and FIG. 8B is a cross-sectional schematic diagram ofa second structure of a terminal control system when a protective caseis in a flipped state according to an embodiment of the presentinvention.

When the protective case 42 is in a flip-up state, a magnetic fieldwhose strength is not less than a first magnetic field strength and thatis generated by the magnet 43 passes through the working plane of thefirst Hall effect sensor 44 from an upper surface of the first Halleffect sensor 44, a north-pole interrupt occurs in the first Hall effectsensor 44, and the first Hall effect sensor 44 outputs a first signalsuch as a high-level signal; and a magnetic field whose strength is notless than a second magnetic field strength and that is generated by themagnet 43 passes through the working plane of the second Hall effectsensor 45 from an upper surface of the second Hall effect sensor 45, asouth-pole interrupt occurs in the second Hall effect sensor 45, and thesecond Hall effect sensor 45 outputs a second signal such as a low-levelsignal.

When the protective case 42 is in a flip-back state, the magnetic fieldwhose strength is not less than the first magnetic field strength andthat is generated by the magnet 43 passes through the working plane ofthe first Hall effect sensor 44 from a second surface of the first Halleffect sensor 44, and the first Hall effect sensor 44 outputs a thirdsignal; and the magnetic field whose strength is not less than thesecond magnetic field strength and that is generated by the magnet 43passes through the working plane of the second Hall effect sensor 45from a second surface of the second Hall effect sensor 45, and thesecond Hall effect sensor 45 outputs a fourth signal.

When it is detected that an output signal of the first Hall effectsensor 44 changes into the first signal and an output signal of thesecond Hall effect sensor 45 changes into the second signal, itindicates that the protective case 42 changes from an expanded state tothe flip-up state. In this case, the terminal 41 may perform a firstoperation.

When it is detected that the output signal of the first Hall effectsensor 44 changes into the third signal and the output signal of thesecond Hall effect sensor 45 changes into the fourth signal, itindicates that the protective case 42 changes from the expanded state tothe flip-back state. In this case, the terminal 41 may perform a secondoperation.

The following describes a principle of a terminal control method byusing, as an example, a relative position relationship between the firstmagnet, the second magnet, the first Hall effect sensor, and the secondHall effect sensor shown in FIG. 6 in the first setting manner for aHall effect sensor and a magnet.

Referring to FIG. 9A and FIG. 9B, FIG. 9A is a cross-sectional schematicdiagram of a third structure of a terminal control system when aprotective case is in a closed state according to an embodiment of thepresent invention, and FIG. 9B is a cross-sectional schematic diagram ofa fourth structure of a terminal control system when a protective caseis in a flipped state according to an embodiment of the presentinvention.

When the protective case 62 is in a flip-up state, a magnetic fieldwhose strength is not less than a first magnetic field strength and thatis generated by the first magnet 63 passes through the working plane ofthe first Hall effect sensor 64 from an upper surface of the first Halleffect sensor 64, a north-pole interrupt occurs in the first Hall effectsensor 64, and the first Hall effect sensor 64 outputs a first signalsuch as a high-level signal; and a magnetic field whose strength is notless than a second magnetic field strength and that is generated by thesecond magnet 66 passes through the working plane of the second Halleffect sensor 65 from an upper surface of the second Hall effect sensor65, a north-pole interrupt occurs in the second Hall effect sensor 65,and the second Hall effect sensor 65 outputs a second signal such as ahigh-level signal.

When the protective case 62 is in a flip-back state, the magnetic fieldwhose strength is not less than the first magnetic field strength andthat is generated by the first magnet 63 passes through the workingplane of the first Hall effect sensor 64 from a second surface of thefirst Hall effect sensor 64, and the first Hall effect sensor 64 outputsa third signal; and the magnetic field whose strength is not less thanthe second magnetic field strength and that is generated by the secondmagnet 66 passes through the working plane of the second Hall effectsensor 65 from a second surface of the second Hall effect sensor 65, andthe second Hall effect sensor 65 outputs a fourth signal.

When it is detected that an output signal of the first Hall effectsensor 64 changes into the first signal and an output signal of thesecond Hall effect sensor 65 changes into the second signal, itindicates that the protective case 62 changes from an expanded state tothe flip-up state. In this case, the terminal 61 may perform a firstoperation.

When it is detected that the output signal of the first Hall effectsensor 64 changes into the third signal and the output signal of thesecond Hall effect sensor 65 changes into the fourth signal, itindicates that the protective case 62 changes from the expanded state tothe flip-back state. In this case, the terminal 61 may perform a secondoperation.

The following describes a terminal in an embodiment of the presentinvention.

The terminal may include a processor and a memory. Referring to FIG. 10,FIG. 10 is a schematic structural diagram of a first terminal accordingto an embodiment of the present invention. A processor 1010 is connectedto a memory 1020 by using a bus 1030. The memory 1020 is configured tostore data and program code, and the processor 1010 is configured toinvoke the data and the program code stored in the memory 1020 toperform the following step:

performing a target operation in response to an operation of detectingthat an output signal of a first Hall effect sensor changes and anoutput signal of a second Hall effect sensor changes.

Optionally, that the processor performs a target operation in responseto an operation of detecting that an output signal of a first Halleffect sensor changes and an output signal of a second Hall effectsensor changes specifically includes at least one of the followingsteps:

performing a first operation in response to an operation of detectingthat the output signal of the first Hall effect sensor changes into afirst signal and the output signal of the second Hall effect sensorchanges into a second signal;

performing a second operation in response to an operation of detectingthat the output signal of the first Hall effect sensor changes into athird signal and the output signal of the second Hall effect sensorchanges into a fourth signal; and performing a third operation inresponse to an operation of detecting that the output signal of thefirst Hall effect sensor changes into a fifth signal and the outputsignal of the second Hall effect sensor changes into a sixth signal.

For the first setting manner for a Hall effect sensor and a magnet,referring to FIG. 11, FIG. 11 is a schematic structural diagram of asecond terminal according to an embodiment of the present invention. Theterminal further includes a first Hall effect sensor 1040 and a secondHall effect sensor 1050, and the processor 1010 is connected to thefirst Hall effect sensor 1040 and the second Hall effect sensor 1050 byusing the bus 1030.

For the second, third, fourth, or fifth setting manner for a Hall effectsensor and a magnet, the terminal includes a communications module inaddition to the processor 1010 and the memory 1020 of the terminal inFIG. 10. Referring to FIG. 12, FIG. 12 is a schematic structural diagramof a third terminal according to an embodiment of the present invention.The processor 1010 is connected to a communications module 1060 by usingthe bus 1030. The communications module 1060 is configured to establisha communication connection to a communication peer end (for example, aprotective case), to implement information exchange with thecommunication peer end. For the third setting manner for a Hall effectsensor and a magnet, the terminal further includes a second sensor.

The processor 1010 is further configured to receive an operationindication instruction sent by the protective case, where the operationindication instruction is an instruction that is generated by theprotective case based on a change of the output signal of the first Halleffect sensor and a change of the output signal of the second Halleffect sensor and that is sent to the terminal, and is used to instructthe terminal to perform the target operation.

It may be understood that the operation indication instruction mayinclude at least one of a first operation indication instruction, asecond operation indication instruction, a third operation indicationinstruction, and the like. The first operation indication instruction isgenerated by the protective case based on the first signal and thesecond signal, and is used to instruct the terminal to perform the firstoperation, the second operation indication instruction is generated bythe protective case based on the third signal and the fourth signal, andis used to instruct the terminal to perform the second operation, andthe third operation indication instruction is generated by theprotective case based on the fifth signal and the sixth signal, and isused to instruct the terminal to perform the third operation.

For descriptions of a structure of the protective case, the firstsignal, the second signal, the third signal, the fourth signal, arelative position relationship between the first Hall effect sensor, thesecond Hall effect sensor, and a magnet, and the like, refer to therelated descriptions in the foregoing embodiment. Details are notdescribed again in the present invention. Corresponding to each settingmanner for a Hall effect sensor and a magnet, the terminal may furtherinclude a magnet.

The memory 1020 may be configured to store a computer program and amodule, and the memory 1020 may include a high-speed random accessmemory, or may include a non-volatile memory such as at least onemagnetic disk storage device, a flash memory device, or another volatilesolid-state storage device. Correspondingly, the memory 1020 may furtherinclude a memory controller, to provide access for the processor 1010.

The communications module 1060 is configured to establish acommunication channel, so that the terminal is connected to thecommunication peer end by using the communication channel, and exchangesdata with the communication peer end by using the communication channel.The communications module 1060 may include a Bluetooth (Bluetooth)module, an NFC (Near Field Communication) module, a WiFi (WirelessFidelity) module, and the like.

The processor 1010 is a control center of the terminal, is connected toall parts of the entire terminal by using various interfaces and lines,and performs various functions of the terminal and data processing byrunning or executing the computer program and/or the module stored inthe memory 1020 and invoking the data stored in the memory 1020, so asto perform overall monitoring on the terminal. Optionally, the processor1010 may include one or more processing cores. Preferably, anapplication processor and a modem processor may be integrated into theprocessor 1010. The application processor mainly processes an operatingsystem, a user interface, an application program, and the like, and themodem processor mainly processes wireless communication. It may beunderstood that alternatively, the modem processor may not be integratedinto the processor 1010.

It may be understood that, based on a setting manner for a Hall effectsensor and a magnet, the terminal may further include a magnet.Optionally, the magnet may include a plurality of strip magnets such asa first magnet and a second magnet.

It should be noted that for implementation of each instruction in thisembodiment of the present invention, refer to the related descriptionsin the method embodiment, and details are not described again in thepresent invention.

The following describes a protective case in an embodiment of thepresent invention.

For the first setting manner for a Hall effect sensor and a magnet, theprotective case is a protective case that matches a terminal, andperforms a terminal control method in cooperation with the terminal. Fora structure of the protective case, refer to the protective case shownin FIG. 4A, FIG. 4B, FIG. 4C, FIG. 5A, or FIG. 7. Details are notdescribed again in the present invention.

For the second, third, fourth, or fifth setting manner for a Hall effectsensor and a magnet, referring to FIG. 13, FIG. 13 is a schematicstructural diagram of a protective case according to an embodiment ofthe present invention. The protective case may include a processor 1310,a memory 1320, a first Hall effect sensor 1330, a second Hall effectsensor 1340, and a communications module 1350. The processor 1310 isconnected to the memory 1320, the first Hall effect sensor 1330, thesecond Hall effect sensor 1340, and the communications module 1350 byusing a bus 1360.

The processor 1310 is configured to invoke data and program code storedin the memory to perform the following step:

sending, by using the communications module, an operation indicationinstruction to a terminal in response to an operation of detecting thatan output signal of the first Hall effect sensor changes and an outputsignal of the second Hall effect sensor changes, where the operationindication instruction is generated by the protective case based on achange of the output signal of the first Hall effect sensor and a changeof the output signal of the second Hall effect sensor, and is used toinstruct the terminal to perform a target operation.

It may be understood that the operation indication instruction mayinclude at least one of a first operation indication instruction, asecond operation indication instruction, a third operation indicationinstruction, and the like.

For descriptions of a structure of the protective case, a first signal,a second signal, a third signal, a fourth signal, a relative positionrelationship between the first Hall effect sensor, the second Halleffect sensor, and a magnet, the first operation indication instruction,the second operation indication instruction, the third operationindication instruction, and the like, refer to the related descriptionsin the foregoing embodiment. Details are not described again in thepresent invention. Corresponding to each setting manner for a Halleffect sensor and a magnet, the protective case may further include amagnet.

The memory 1320 may be configured to store a computer program and amodule, and the memory 1320 may include a high-speed random accessmemory, or may include a non-volatile memory such as at least onemagnetic disk storage device, a flash memory device, or another volatilesolid-state storage device. Correspondingly, the memory 1320 may furtherinclude a memory controller, to provide access for the processor 1310.

The communications module 1350 is configured to establish acommunication channel, so that the protective case is connected to acommunication peer end by using the communication channel, and exchangesdata with the communication peer end by using the communication channel.The communications module 1350 may include a Bluetooth (Bluetooth)module, an NFC (Near Field Communication) module, a WiFi (WirelessFidelity) module, and the like.

The processor 1310 is a control center of the protective case, isconnected to all parts of the entire protective case by using variousinterfaces and lines, and performs various functions of the protectivecase and data processing by running or executing the computer programand/or the module stored in the memory 1320 and invoking data stored inthe memory 1320, so as to perform overall monitoring on the protectivecase. Optionally, the processor 1310 may include one or more processingcores. Preferably, an application processor and a modem processor may beintegrated into the processor 1310. The application processor mainlyprocesses an operating system, a user interface, an application program,and the like, and the modem processor mainly processes wirelesscommunication. It may be understood that alternatively, the modemprocessor may not be integrated into the processor 1310.

It should be noted that the first Hall effect sensor and the second Halleffect sensor are not units mandatory for the protective case. For thethird setting manner for a Hall effect sensor and a magnet, theprotective case may not include the second Hall effect sensor 1340.Based on a setting manner for a Hall effect sensor and a magnet, theprotective case may further include a magnet. Optionally, the magnet mayinclude a plurality of strip magnets such as a first magnet and a secondmagnet.

It should be further noted that for implementation of each instructionin this embodiment of the present invention, refer to the relateddescriptions in the method embodiment, and details are not describedagain in the present invention.

The following describes another terminal provided in an embodiment ofthe present invention.

In this embodiment of the present invention, the terminal may be aflippable terminal. Referring to FIG. 14 and FIG. 15, FIG. 14 is aschematic structural diagram of a flippable terminal according to anembodiment of the present invention, and FIG. 15 is a structuralframework diagram of a flippable terminal according to an embodiment ofthe present invention. A terminal control method provided in theembodiments of the present invention may also be implemented based onthe flippable terminal.

The flippable terminal includes a first body 141, a second body 142, anda flip shaft 143 that connects the first body 141 and the second body142. A magnet 144 is disposed in the first body 141, and a first Halleffect sensor 145 and a second Hall effect sensor 146 are disposed inthe second body 142. A control apparatus 147 is disposed in the firstbody 141 or the second body 142, and the control apparatus 147 includesa processor 1471 and a memory 1472. The processor 1471 is connected tothe first Hall effect sensor 145 and the second Hall effect sensor 146by using a bus 1473.

It may be understood that, similar to a flip-up state of a protectivecase, a flip-up state of the flippable terminal includes a closed stateof the flippable terminal and a half-closed state of the flippableterminal. It may be assumed that, when the flippable terminal is in theclosed state, a first surface of the first body 141 laminates the secondbody.

Referring to FIG. 16A, FIG. 16A is a cross-sectional schematic diagramof a flippable terminal in a closed state according to an embodiment ofthe present invention. The closed state of the flippable terminal is astate in which a first surface 1411 of the first body 141 of theflippable terminal laminates the second body 142.

Referring to FIG. 16B, FIG. 16B is a cross-sectional schematic diagramof a flippable terminal in a half-closed state according to anembodiment of the present invention. The half-closed state of theflippable terminal is a state in which a fourth included angle 1601 isformed between the first surface 1411 of the first body 141 of theflippable terminal and a plane on which the second body 142 is located,and the fourth included angle is less than a fourth angle threshold. Thefourth angle threshold is a maximum included angle when the first Halleffect sensor can be triggered to output a first signal and the secondHall effect sensor 146 can be triggered to output a second signal.

It may be understood that a flip-back state of the flippable terminalincludes a flipped state of the flippable terminal and a half-flippedstate of the flippable terminal. The first surface 1411 of the firstbody 141 and a second surface 1412 of the first body 141 are twosurfaces disposed opposite to each other.

Referring to FIG. 16C, FIG. 16C is a cross-sectional schematic diagramof a flippable terminal in a flipped state according to an embodiment ofthe present invention. The flipped state of the flippable terminal is astate in which the second surface 1412 of the first body 141 of theflippable terminal laminates the second body 142.

Referring to FIG. 16D, FIG. 16D is a cross-sectional schematic diagramof a flippable terminal in a half-flipped state according to anembodiment of the present invention. The half-flipped state of theflippable terminal is a state in which a fifth included angle 1602 isformed between the second surface 1412 of the first body 141 of theflippable terminal and the plane on which the second body 142 islocated, and the fifth included angle is less than a fifth anglethreshold. Optionally, the fifth angle threshold is a maximum includedangle when the first Hall effect sensor 145 can be triggered to output athird signal and the second Hall effect sensor 146 can be triggered tooutput a fourth signal.

It may be understood that the flippable terminal further includes anexpanded state. Referring to FIG. 16E, FIG. 16E is a cross-sectionalschematic diagram of a flippable terminal in an expanded state accordingto an embodiment of the present invention. In this case, a sixthincluded angle 1603 is formed between the first surface 1411 of thefirst body 141 of the flippable terminal and the plane on which thesecond body 142 is located, and the sixth included angle 1603 is greaterthan the fourth angle threshold. In an embodiment of the presentinvention, the sixth included angle 1603 is greater than a fourth anglethreshold and less than a difference between 3600 and the fifth includedangle.

When the flippable terminal is in the flip-up state, a magnetic fieldwhose strength is not less than a first magnetic field strength and thatis generated by the magnet 144 passes through a working plane of thefirst Hall effect sensor from a first surface of the first Hall effectsensor, and the first Hall effect sensor outputs the first signal; and amagnetic field whose strength is not less than a second magnetic fieldstrength and that is generated by the magnet 144 passes through aworking plane of the second Hall effect sensor 146 from a first surfaceof the second Hall effect sensor 146, and the second Hall effect sensor146 outputs the second signal.

When the flippable terminal is in the flip-back state, the magneticfield whose strength is not less than the first magnetic field strengthand that is generated by the magnet 144 passes through the working planeof the first Hall effect sensor from a second surface of the first Halleffect sensor, and the first Hall effect sensor 145 outputs the thirdsignal; and the magnetic field whose strength is not less than thesecond magnetic field strength and that is generated by the magnet 144passes through the working plane of the second Hall effect sensor 146from a second surface of the second Hall effect sensor 146, and thesecond Hall effect sensor 146 outputs the fourth signal.

When a protective case is in the expanded state, a magnetic field whosestrength is less than the first magnetic field strength and that isgenerated by the magnet 144 passes through the working plane of thefirst Hall effect sensor 145 from the first surface or the secondsurface of the first Hall effect sensor 145, and the first Hall effectsensor 145 outputs a fifth signal; and a magnetic field whose strengthis less than the second magnetic field strength and that is generated bythe magnet 144 passes through the working plane of the second Halleffect sensor 146 from the first surface or the second surface of thesecond Hall effect sensor 146, and the second Hall effect sensor 146outputs a sixth signal. It may be understood that when the protectivecase is in the expanded state, a strength of a magnetic field that actson the first Hall effect sensor 145 is less than the first magneticfield strength, and may also be 0; and a strength of a magnetic fieldthat acts on the second Hall effect sensor 146 is less than the secondmagnetic field strength, and may also be 0.

In an embodiment of the present invention, the first surface of thefirst Hall effect sensor and the second surface of the first Hall effectsensor may be a same surface of the first Hall effect sensor, and thesurface is parallel to the working plane of the first Hall effectsensor. The first surface of the second Hall effect sensor and thesecond surface of the second Hall effect sensor may be a same surface ofthe second Hall effect sensor, and the surface is parallel to theworking plane of the second Hall effect sensor. In this case, the firstsignal is the same as the third signal, the first signal is differentfrom the fifth signal, the second signal is the same as the fourthsignal, and the second signal is different from the sixth signal.

In this case, a relative position relationship between the magnet andthe Hall effect sensors may be: When the protective case is in a closedstate, a connection line between a north pole and a south pole of themagnet is vertical to both the working plane of the first Hall effectsensor and the working plane of the second Hall effect sensor.

In an embodiment of the present invention, the first surface of thefirst Hall effect sensor 145 and the second surface of the first Halleffect sensor 145 are two opposite surfaces of the first Hall effectsensor 145, and both the first surface of the first Hall effect sensor145 and the second surface of the first Hall effect sensor 145 areparallel to the working plane of the first Hall effect sensor 145; andthe first surface of the second Hall effect sensor 146 and the secondsurface of the second Hall effect sensor 146 are two opposite surfacesof the second Hall effect sensor 146, and both the first surface of thesecond Hall effect sensor 146 and the second surface of the second Halleffect sensor 146 are parallel to the working plane of the Hall effectsensor.

In this case, a relative position relationship between the magnet andthe Hall effect sensors may be: When the protective case is in a closedstate, a connection line between a north pole and a south pole of themagnet is parallel to both the working plane of the first Hall effectsensor and the working plane of the second Hall effect sensor.

It may be understood that in the foregoing embodiment, a status of theterminal may be identified by using an output signal of the first Halleffect sensor and an output signal of the second Hall effect sensor. Theterminal may perform different operations based on an identified statuschange of the terminal.

In this embodiment of the present invention, the processor 1471 isconnected to the memory 1472, the first Hall effect sensor 145, and thesecond Hall effect sensor 146 by using the bus 1473. The processor 1471is configured to invoke data and program code stored in the memory 1472to perform the following step: performing a target operation in responseto an operation of detecting that the output signal of the first Halleffect sensor changes and the output signal of the second Hall effectsensor changes.

Optionally, that the processor performs a target operation in responseto an operation of detecting that the output signal of the first Halleffect sensor changes and the output signal of the second Hall effectsensor changes specifically includes at least one of the followingsteps:

performing a first operation in response to an operation of detectingthat the output signal of the first Hall effect sensor changes into thefirst signal and the output signal of the second Hall effect sensorchanges into the second signal;

performing a second operation in response to an operation of detectingthat the output signal of the first Hall effect sensor changes into thethird signal and the output signal of the second Hall effect sensorchanges into the fourth signal; and performing a third operation inresponse to an operation of detecting that the output signal of thefirst Hall effect sensor changes into the fifth signal and the outputsignal of the second Hall effect sensor changes into the sixth signal.

Optionally, when it is detected that the output signal of the first Halleffect sensor 145 changes from the first signal to the fifth signal andthe output signal of the second Hall effect sensor 146 changes from thesecond signal to the sixth signal, it indicates that the flippableterminal changes from the flip-up state to the expanded state. In thiscase, the processor 1471 may further perform the third operation.

Optionally, when it is detected that the output signal of the first Halleffect sensor 145 changes from the third signal to the fifth signal andthe output signal of the second Hall effect sensor 146 changes from thefourth signal to the sixth signal, it indicates that the flippableterminal changes from the flip-back state to the expanded state. In thiscase, the processor 1471 may further perform a fourth operation.

In an embodiment of the present invention, the magnet 144 may be a stripmagnet. When the flippable terminal is in the closed state, theconnection line between the north pole and the south pole of the magnet144 may be parallel to both the working plane of the first Hall effectsensor 145 and the working plane of the second Hall effect sensor 146,so that directions of a magnetic field that passes through a Hall effectsensor are different when the flippable terminal is in the closed stateand the flipped state, thereby avoiding a misoperation of the flippableterminal.

It should be noted that the flippable terminal may include but is notlimited to a flippable mobile computer, a flippable tablet computer, aflippable mobile phone, a flippable personal digital assistant (PersonalDigital Assistant, PDA), a flippable media player, and the like.

It should be further noted that the flippable terminal may furtherinclude a communications module, an input apparatus, an outputapparatus, and the like. The communications module is configured toestablish a communication connection to a communication peer end for theflippable terminal, and the input apparatus is configured to implementinformation input. The input apparatus may be configured to receiveentered digital or character information, and generate signal input thatis of a keyboard, a mouse, a joystick, optics, or a trackball and thatis related to a user setting and function control. The output apparatusmay be configured to display information entered by a user orinformation provided for the user, and various graphical user interfaces(for example, a moving track display interface described in theembodiments of the present invention) of the flippable terminal. Thesegraphical user interfaces may include a graphic, a text, an icon, avideo, and any combination thereof.

For example, the flippable terminal may include a notebook computer, thefirst body 141 may include a screen, and the second body 142 may includea host of the notebook computer.

For example, the flippable terminal may include a collapsible screen.The collapsible screen includes a first screen and a second screen thatare connected, the first screen may be located in the first body 141 ofthe flippable terminal, and the second screen may be located in thesecond body 142 of the flippable terminal.

The following describes a relative position relationship between themagnet, the first Hall effect sensor, and the second Hall effect sensorin the flippable terminal and a principle of a terminal control method.

In an embodiment of the present invention, when the flippable terminalis in the closed state, the connection line between the north pole ofthe magnet and the south pole of the magnet may be vertical to theworking plane of the first Hall effect sensor and/or the working planeof the second Hall effect sensor. A terminal control principle of theflippable terminal is similar to that of the terminal control systemshown in FIG. 4A or FIG. 4B, and details are not described again in thepresent invention.

In an embodiment of the present invention, the connection line betweenthe north pole of the magnet and the south pole of the magnet may beparallel to a plane on which the first body is located. The workingplane of the first Hall effect sensor and the working plane of thesecond Hall effect sensor may be parallel to a plane on which the secondbody is located. When the flippable terminal is in the closed state, theplane on which the first body 141 is located is parallel to the plane onwhich the second body is located, a distance between the first Halleffect sensor and a projection of the magnet onto the plane on which thesecond body is located is greater than a fifth distance threshold, and adistance between the second Hall effect sensor and a projection of themagnet onto the plane on which the second body is located is greaterthan a sixth distance threshold. The fifth distance threshold is aminimum distance between the projection of the magnet onto the plane onwhich the second body is located and the first Hall effect sensor whenthe Hall effect sensor can output the first signal and the third signal.The sixth distance threshold is a minimum distance between theprojection of the magnet onto the plane on which the second body islocated and the second Hall effect sensor when the Hall effect sensorcan output the second signal and the fourth signal. The fifth distancethreshold or the sixth distance threshold is usually greater than 0. Thefifth distance threshold or the sixth distance threshold is related todistribution of magnetic field strengths of the magnet and a parameterof the Hall effect sensor, for example, a Hall coefficient of amaterial, a thickness of the material, and intensity of a current.Optionally, due to a fifth distance threshold or a sixth distancethreshold, a value of a strength of a magnetic field that passes througha working plane of a Hall effect sensor can be not less than 0.8 mT to3.4 mT when the flippable terminal is in the closed state or the flippedstate.

Referring to FIG. 17A and FIG. 17B, FIG. 17A is a cross-sectionalschematic diagram of a first structure of a flippable terminal in aclosed state according to an embodiment of the present invention, andFIG. 17B is a cross-sectional schematic diagram of a first structure ofa flippable terminal in a flipped state according to an embodiment ofthe present invention. The flippable terminal includes a first body 171,a second body 172, and a flip shaft 173 that connects the first body 171and the second body 172. A magnet 174 is disposed in the first body 171,and a connection line between a north pole of the magnet 174 and a southpole of the magnet 174 may be parallel to a plane on which the firstbody 171 is located. A first Hall effect sensor 175 and a second Halleffect sensor 176 are disposed in the flippable terminal, and both aworking plane of the first Hall effect sensor 175 and a working plane ofthe second Hall effect sensor 176 are parallel to a plane on which abase plate 221 is located. A distance d5 between the first Hall effectsensor 175 and a projection of the magnet onto a plane on which thesecond body 172 is located is greater than a fifth distance threshold,and a distance d6 between the second Hall effect sensor 176 and aprojection of the magnet onto the plane on which the second body 172 islocated is greater than a sixth distance threshold.

In an embodiment of the present invention, the connection line betweenthe north pole of the magnet and the south pole of the magnet may bevertical to the plane on which the first body is located. The workingplane of the first Hall effect sensor and the working plane of thesecond Hall effect sensor may be vertical to the plane on which thefirst body is located. When the flippable terminal is in the closedstate, the plane on which the first body is located is parallel to theplane on which the second body is located. A distance between the firstHall effect sensor and a projection of the magnet onto the plane onwhich the second body is located is greater than a seventh distancethreshold, and a distance between the second Hall effect sensor and aprojection of the magnet onto the plane on which the second body islocated is greater than an eighth distance threshold. The seventhdistance threshold is a minimum distance between a projection of themagnet onto a plane on which the flippable terminal is located and thefirst Hall effect sensor when the Hall effect sensor can output a firstsignal and a third signal. The eighth distance threshold is a minimumdistance between the projection of the magnet onto the plane on whichthe second body is located and the second Hall effect sensor when theHall effect sensor can output a second signal and a fourth signal. Theseventh distance threshold or the eighth distance threshold is usuallygreater than 0. The seventh distance threshold or the eighth distancethreshold is related to distribution of magnetic field strengths of themagnet and a parameter of the Hall effect sensor, for example, a Hallcoefficient of a material, a thickness of the material, and intensity ofa current. Optionally, due to the seventh distance threshold or theeighth distance threshold, a value of a strength of a magnetic fieldthat passes through a working plane of a Hall effect sensor can be notless than 0.8 mT to 3.4 mT when the flippable terminal is in the closedstate or the flipped state.

Referring to FIG. 18A and FIG. 18B, FIG. 18A is a cross-sectionalschematic diagram of a second structure of a flippable terminal when theflippable terminal is in a closed state according to an embodiment ofthe present invention, and FIG. 18B is a cross-sectional schematicdiagram of a second structure of a flippable terminal when the flippableterminal is in a flipped state according to an embodiment of the presentinvention. The flippable terminal includes a first body 181, a secondbody 182, and a flip shaft 183 that connects the first body 181 and thesecond body 182. A magnet 184 is disposed in the first body 181, and aconnection line between a north pole of the magnet 184 and a south poleof the magnet 184 may be vertical to a plane on which the first body 181is located. A first Hall effect sensor 185 and a second Hall effectsensor 186 are disposed in the second body 182, and both a working planeof the first Hall effect sensor 185 and a working plane of the secondHall effect sensor 186 are vertical to a plane on which the second body182 is located. A distance d7 between the first Hall effect sensor 185and a projection of the magnet onto the plane on which the second body182 is located is greater than a seventh distance threshold, and adistance d8 between the second Hall effect sensor 186 and a projectionof the magnet onto the plane on which the second body 182 is located isgreater than an eighth distance threshold.

When the flippable terminal is in a flip-up state, as shown in FIG. 17Aor FIG. 18A, a magnetic field whose strength is not less than a firstmagnetic field strength and that is generated by the magnet passesthrough the working plane of the first Hall effect sensor from a firstsurface of the first Hall effect sensor (an upper surface of the firstHall effect sensor 175 in FIG. 17A and a right surface of the first Halleffect sensor 185 in FIG. 18A), a north-pole interrupt occurs in thefirst Hall effect sensor, and the first Hall effect sensor outputs thefirst signal such as a high-level signal; and a magnetic field whosestrength is not less than a second magnetic field strength and that isgenerated by the magnet passes through the working plane of the secondHall effect sensor from a first surface of the second Hall effect sensor(a lower surface of the second Hall effect sensor 176 in FIG. 17A and aleft surface of the second Hall effect sensor 186 in FIG. 18A), asouth-pole interrupt occurs in the second Hall effect sensor, and thesecond Hall effect sensor outputs the second signal such as a low-levelsignal.

When the flippable terminal is in a flip-back state, as shown in FIG.17B or FIG. 18B, the magnetic field whose strength is not less than thefirst magnetic field strength and that is generated by the magnet passesthrough the working plane of the first Hall effect sensor from a secondsurface of the first Hall effect sensor (a lower surface of the firstHall effect sensor 175 in FIG. 17A and a left surface of the first Halleffect sensor 185 in FIG. 18A), a south-pole interrupt occurs in thefirst Hall effect sensor, and the first Hall effect sensor outputs thethird signal such as a low-level signal; and the magnetic field whosestrength is not less than the second magnetic field strength and that isgenerated by the magnet passes through the working plane of the secondHall effect sensor from a second surface of the second Hall effectsensor 146 (an upper surface of the second Hall effect sensor 176 inFIG. 17A and a right surface of the second Hall effect sensor 186 inFIG. 18A), a north-pole interrupt occurs in the second Hall effectsensor, and the second Hall effect sensor outputs the fourth signal suchas a high-level signal.

It should be noted that, when the first Hall effect sensor can outputthe first signal and the third signal and the second Hall effect sensorcan output the second signal and the fourth signal, an angle may beformed between the working plane of the first Hall effect sensor and/orthe working plane of the second Hall effect sensor and the plane onwhich the second body is located, and/or an angle is formed between theconnection line between the north pole of the magnet and the south poleof the magnet and the plane on which the first body is located, so thatwhen the flippable terminal is in the closed state, an angle is formedbetween the working plane of the first Hall effect sensor and/or theworking plane of the second Hall effect sensor and the connection linebetween the north pole of the magnet and the south pole of the magnet.

In an embodiment of the present invention, the flippable terminal mayinclude a plurality of magnets such as a first magnet and a secondmagnet. The first magnet mainly acts on the first Hall effect sensor,and the second magnet mainly acts on the second Hall effect sensor.Referring to FIG. 19A and FIG. 19B, FIG. 19A is a cross-sectionalschematic diagram of a third structure of a flippable terminal when theflippable terminal is in a closed state according to an embodiment ofthe present invention, and FIG. 19B is a cross-sectional schematicdiagram of a third structure of a flippable terminal when the flippableterminal is in a flipped state according to an embodiment of the presentinvention. The flippable terminal includes a first body 191, a secondbody 192, and a flip shaft 193 that connects the first body 191 and thesecond body 192. A first magnet 1941 and a second magnet 1942 aredisposed in the first body 191, and both a connection line between anorth pole of the first magnet 1941 and a south pole of the first magnet1941 and a connection line between a north pole of the second magnet1942 and a south pole of the second magnet 1942 may be parallel to aplane on which the second body 192 is located. A first Hall effectsensor 195 and a second Hall effect sensor 196 are disposed in thesecond body 192, and both a working plane of the first Hall effectsensor 195 and a working plane of the second Hall effect sensor 196 areparallel to the plane on which the second body 192 is located. Adistance d5 between the first Hall effect sensor 195 and a projection ofthe first magnet 1941 onto the plane on which the second body 192 islocated is greater than a fifth distance threshold, and a distance d6between the second Hall effect sensor 196 and a projection of the secondmagnet 1942 onto the plane on which the second body 192 is located isgreater than a sixth distance threshold. For descriptions of the fifthdistance threshold or the sixth distance threshold, refer to the relateddescriptions in the foregoing embodiment. Details are not describedagain in the present invention.

When the flippable terminal is in a flip-up state, a magnetic fieldwhose strength is not less than a first magnetic field strength and thatis generated by the first magnet 1941 passes through the working planeof the first Hall effect sensor 195 from a first surface (an uppersurface) of the first Hall effect sensor 195, a north-pole interruptoccurs in the first Hall effect sensor 195, and the first Hall effectsensor 195 outputs a first signal such as a high-level signal; and amagnetic field whose strength is not less than a second magnetic fieldstrength and that is generated by the second magnet 1942 passes throughthe working plane of the second Hall effect sensor 196 from a firstsurface (a lower surface) of the second Hall effect sensor 196, asouth-pole interrupt occurs in the first Hall effect sensor 195, and thesecond Hall effect sensor 196 outputs a second signal such as alow-level signal.

When the flippable terminal is in a flip-back state, the magnetic fieldwhose strength is not less than the first magnetic field strength andthat is generated by the first magnet passes through the working planeof the first Hall effect sensor 195 from a second surface (a lowersurface) of the first Hall effect sensor 195, a south-pole interruptoccurs in the first Hall effect sensor 195, and the first Hall effectsensor 195 outputs a third signal such as a low-level signal; and themagnetic field whose strength is not less than the second magnetic fieldstrength and that is generated by the second magnet passes through theworking plane of the second Hall effect sensor 196 from a second surface(an upper surface) of the second Hall effect sensor 196, a north-poleinterrupt occurs in the second Hall effect sensor 196, and the secondHall effect sensor 196 outputs a fourth signal such as a high-levelsignal.

It should be noted that both the connection line between the north poleof the first magnet and the south pole of the first magnet and theconnection line between the north pole of the second magnet and thesouth pole of the second magnet may be vertical to a plane on which thefirst body is located, and both the working plane of the first Halleffect sensor and the working plane of the second Hall effect sensor arevertical to the plane on which the second body is located.

It should be further noted that, when the first Hall effect sensor canoutput the first signal and the third signal and the second Hall effectsensor can output the second signal and the fourth signal, an angle maybe formed between the working plane of the first Hall effect sensorand/or the working plane of the second Hall effect sensor and the planeon which the second body is located, and/or an angle is formed betweenthe connection line between the north pole of the first magnet and thesouth pole of the first magnet and/or the connection line between thenorth pole of the first magnet and the south pole of the first magnetand the plane on which the first body is located, so that when theflippable terminal is in the closed state, an angle is formed betweenthe working plane of the first Hall effect sensor and the connectionline between the north pole of the first magnet and the south pole ofthe first magnet, and/or an angle is formed between the working plane ofthe second Hall effect sensor and the connection line between the northpole of the second magnet and the south pole of the second magnet.

Referring to FIG. 20, FIG. 20 is a schematic flowchart of a terminalcontrol method according to an embodiment of the present invention. Theterminal control method may be implemented based on the terminal controlsystem shown in FIG. 1, or may be implemented based on only theflippable terminal shown in FIG. 14. The terminal control method mayinclude: performing, by a terminal, a target operation in response to anoperation of detecting that an output signal of a first Hall effectsensor changes and an output signal of a second Hall effect sensorchanges.

A magnetic field is a magnetic field generated by a magnet built in theterminal, or a magnetic field generated by a magnet built in aprotective case of the terminal.

The terminal may be a terminal in a terminal control system, or may be aflippable terminal.

Specifically, an implementation of the performing a target operation inresponse to an operation of detecting that an output signal of a firstHall effect sensor changes and an output signal of a second Hall effectsensor changes includes at least one of the following steps:

Step S201: Perform a first operation in response to an operation ofdetecting that an output signal of a first Hall effect sensor changesinto a first signal and an output signal of a second Hall effect sensorchanges into a second signal.

Step S202: Perform a second operation in response to an operation ofdetecting that the output signal of the first Hall effect sensor changesinto a third signal and the output signal of the second Hall effectsensor changes into a fourth signal.

Step S203: Perform a third operation in response to an operation ofdetecting that the output signal of the first Hall effect sensor changesinto the fifth signal and the output signal of the second Hall effectsensor changes into the sixth signal.

It should be noted that for descriptions of the first signal, the secondsignal, the third signal, the fourth signal, the fifth signal, the sixthsignal, relative positions of the magnet, the first Hall effect sensor,the second Hall effect sensor, and the like, refer to the relateddescriptions in the foregoing embodiment. Details are not describedagain in the present invention.

In an embodiment of the present invention, when the protective case orthe flippable terminal is in a closed state, a connection line between anorth pole and a south pole of the magnet is vertical to both a workingplane of the first Hall effect sensor and a working plane of the secondHall effect sensor. In this case, the terminal cannot identify a flip-upstate or a flip-back state of the protective case, and the flippableterminal cannot identify a flip-up state or a flip-back state of theflippable terminal.

In this case, when it is detected that the output signal of the firstHall effect sensor changes into the first signal and the output signalof the second Hall effect sensor changes into the second signal, itindicates that the protective case 22 changes from an expanded state tothe flip-up state. In this case, the terminal 21 may perform the firstoperation such as a screen off operation.

When it is detected that the output signal of the first Hall effectsensor changes into the fifth signal and the output signal of the secondHall effect sensor changes into the sixth signal, it indicates that theprotective case 22 changes into the expanded state. In this case, theterminal 21 may perform the second operation such as a screen wakeupoperation.

In an embodiment of the present invention, when the protective case orthe flippable terminal is in a closed state, a connection line between anorth pole and a south pole of the magnet is parallel to both a workingplane of the first Hall effect sensor and a working plane of the secondHall effect sensor. The first signal and third signal have oppositepolarities, both the first signal and the third signal are differentfrom the fifth signal, the second signal and the fourth signal haveopposite polarities, and both the second signal and the fourth signalare different from the sixth signal.

In this case, when it is detected that the output signal of the firstHall effect sensor changes into the first signal and the output signalof the second Hall effect sensor changes into the second signal, itindicates that a status of the protective case or the flippable terminalchanges into the flip-up state. In this case, the terminal or theflippable terminal may perform the first operation. When it is detectedthat the output signal of the first Hall effect sensor changes into thethird signal and the output signal of the second Hall effect sensorchanges into the fourth signal, it indicates that a status of theprotective case or the flippable terminal changes into the flip-backstate. In this case, the terminal or the flippable terminal may performthe second operation.

The terminal can identify the flip-up state or the flip-back state ofthe protective case, or the flippable terminal can identify the flip-upstate or the flip-back state of the flippable terminal.

Optionally, an implementation of step S203 may include: performing thethird operation in response to an operation of detecting that the outputsignal of the first Hall effect sensor changes from the first signal tothe fifth signal and the output signal of the second Hall effect sensorchanges from the second signal to the sixth signal.

Optionally, an implementation of step S203 may further include: when itis detected that the output signal of the first Hall effect sensorchanges from the third signal to the fifth signal and the output signalof the second Hall effect sensor changes from the fourth signal to thesixth signal, it indicates that the protective case or the flippableterminal changes from the flip-back state to the expanded state. In thiscase, the terminal or the flippable terminal may perform a fourthoperation.

It may be understood that step S201, step S202, and step S203 may beperformed in any order.

For the flippable terminal, the magnet, the first Hall effect sensor,and the second Hall effect sensor are all located in the flippableterminal, the flippable terminal detects the output signal of the firstHall effect sensor and the output signal of the second Hall effectsensor, and the terminal is controlled, based on a change status of theoutput signal, to perform a corresponding operation.

For the terminal control system including the protective case and theterminal, a position setting manner for the magnet, the first Halleffect sensor, and the second Hall effect sensor may include any one ofthe first to the fifth setting manners for a Hall effect sensor and amagnet. In any other setting manner for a Hall effect sensor and amagnet, for a relative position relationship between the magnet, thefirst Hall effect sensor, and the second Hall effect sensor, refer toany setting manner for the relative position relationship in FIG. 4A,FIG. 4B, FIG. 4C, FIG. 4D, FIG. 5A, FIG. 5B, FIG. 6, and FIG. 7, anddetails are not described again in the present invention.

When the first Hall effect sensor and/or the second Hall effect sensorare or is disposed in the terminal, the terminal detects the outputsignal of the first Hall effect sensor and the output signal of thesecond Hall effect sensor, and the terminal is controlled, based on achange status of the output signal, to perform a correspondingoperation.

When the first Hall effect sensor and/or the second Hall effect sensorare or is disposed in the protective case, the protective case detectsthe output signal of the first Hall effect sensor and the output signalof the second Hall effect sensor. The terminal needs to exchangeinformation with the protective case, so that the terminal obtains achange status of the signals or the signal, detected by the protectivecase, of the first Hall effect sensor and/or the second Hall effectsensor.

Specifically, the protective case may send an operation indicationinstruction to the terminal. The operation indication instruction is aninstruction that is generated by the protective case based on a changeof the output signal of the first Hall effect sensor and a change of theoutput signal of the second Hall effect sensor and that is sent to theterminal, and is used to instruct the terminal to perform the targetoperation. The terminal receives the operation indication instruction,and performs the target operation according to the operation indicationinstruction.

It may be understood that the operation indication instruction mayinclude but is not limited to a first operation indication instruction,a second operation indication instruction, a third operation indicationinstruction, and the like in the foregoing embodiment, andcorrespondingly, the target operation includes but is not limited to thefirst operation, the second operation, the third operation, and thelike. For descriptions of each operation instruction, refer to therelated descriptions in the foregoing embodiment, and details are notdescribed again in the present invention.

For example, the first Hall effect sensor and the second Hall effectsensor are disposed in the protective case. Referring to FIG. 21, FIG.21 is a schematic flowchart of another terminal control method accordingto an embodiment of the present invention. The terminal control methodincludes the following steps:

Step S211: A protective case detects an output signal of a first Halleffect sensor and an output signal of a second Hall effect sensor.

Step S212: The protective case sends a first operation indicationinstruction to a terminal when the protective case detects that theoutput signal of the first Hall effect sensor changes into a firstsignal and the output signal of the second Hall effect sensor changesinto a second signal.

The first operation indication instruction is generated by theprotective case when the protective case detects that the output signalof the first Hall effect sensor changes into the first signal and thesignal of the second Hall effect sensor changes into the second signal,and is used to instruct the terminal to perform a first operation.

Step S213: The terminal receives the first operation indicationinstruction.

Step S214: The terminal performs a first operation according to thefirst operation indication instruction.

Optionally, the first operation indication instruction may also includethe first signal and the second signal. The terminal may identify, basedon the first signal and the second signal, that a status of theprotective case changes into a flip-up state, to perform the firstoperation.

Step S215: The protective case sends the first operation indicationinstruction to the terminal when the protective case detects that theoutput signal of the first Hall effect sensor changes into a thirdsignal and the output signal of the second Hall effect sensor changesinto a fourth signal.

A second operation indication instruction is generated by the protectivecase when the protective case detects that the output signal of thefirst Hall effect sensor changes into the third signal and the signal ofthe second Hall effect sensor changes into the fourth signal, and isused to instruct the terminal to perform a second operation.

Step S216: The terminal receives the second operation indicationinstruction.

Step S217: The terminal performs a second operation according to thesecond operation indication instruction.

Optionally, the second operation indication instruction may also includethe third signal and the fourth signal. The terminal may identify, basedon the third signal and the fourth signal, that the status of theprotective case changes into a flip-back state, to perform the secondoperation.

In an embodiment of the present invention, the protective case sends thedetected signal of the first Hall effect sensor and the detected signalof the second Hall effect sensor to the terminal in real time, and theterminal detects a status change of the protective case based on thereceived output signal of the first Hall effect sensor and the receivedoutput signal of the second Hall effect sensor. When the output signalof the first Hall effect sensor changes into the first signal and theoutput signal of the second Hall effect sensor changes into the secondsignal, the terminal detects that the status of the protective casechanges into the flip-up state, and performs the first operation. Whenthe output signal of the first Hall effect sensor changes into the thirdsignal and the output signal of the second Hall effect sensor changesinto the fourth signal, the terminal detects that the status of theprotective case changes into the flip-back state, and performs thesecond operation.

It should be noted that step S212 and step S215 may be performed in anyorder.

In an embodiment of the present invention, the method further includes:

sending, by the protective case, a third operation indicationinstruction to the terminal when the protective case detects that theoutput signal of the first Hall effect sensor changes into a fifthsignal and the output signal of the second Hall effect sensor changesinto a sixth signal;

receiving, by the terminal, the third operation indication instruction;and

performing, by the terminal, a third operation according to the thirdoperation indication instruction.

The third operation indication instruction is generated by theprotective case when the protective case detects that the output signalof the first Hall effect sensor changes into the fifth signal and thesignal of the second Hall effect sensor changes into the sixth signal,and is used to instruct the terminal to perform the third operation.

Optionally, the third operation indication instruction may also includethe fifth signal and the sixth signal. The terminal may identify, basedon the fifth signal and the sixth signal, that the status of theprotective case changes into an expanded state, to perform the thirdoperation.

In an embodiment of the present invention, the method further includes:

sending, by the protective case, a third operation indicationinstruction to the terminal when the protective case detects that theoutput signal of the first Hall effect sensor changes from the firstsignal to a fifth signal and the output signal of the second Hall effectsensor changes from the second signal to a sixth signal;

receiving, by the terminal, the third operation indication instruction;and

performing, by the terminal, a third operation according to the thirdoperation indication instruction.

The third operation indication instruction is generated by theprotective case when the protective case detects that the output signalof the first Hall effect sensor changes from the first signal to thefifth signal and the output signal of the second Hall effect sensorchanges from the second signal to the sixth signal, and is used toinstruct the terminal to perform the third operation.

Optionally, the third operation indication instruction may also includethe first signal, the second signal, the fifth signal, and the sixthsignal. The terminal may identify, based on the first signal, the secondsignal, the fifth signal, and the sixth signal, that the status of theprotective case changes from the flip-up state to an expanded state, toperform the third operation.

In an embodiment of the present invention, the method further includes:

sending, by the protective case, a fourth operation indicationinstruction to the terminal when the protective case detects that theoutput signal of the first Hall effect sensor changes from the thirdsignal to a fifth signal and the output signal of the second Hall effectsensor changes from the fourth signal to a sixth signal;

receiving, by the terminal, the fourth operation indication instruction;and

performing, by the terminal, a fourth operation according to the fourthoperation indication instruction.

The fourth operation indication instruction is generated by theprotective case when the protective case detects that the output signalof the first Hall effect sensor changes from the third signal to thefifth signal and the output signal of the second Hall effect sensorchanges from the fourth signal to the sixth signal, and is used toinstruct the terminal to perform the fourth operation.

Optionally, the fourth operation indication instruction may also includethe third signal, the fourth signal, the fifth signal, and the sixthsignal. The terminal may identify, based on the third signal, the fourthsignal, the fifth signal, and the sixth signal, that the status of theprotective case changes from the flip-back state to an expanded state,to perform the fourth operation.

It should be noted that for working planes of the Hall effect sensors,each signal, a first magnet field strength, a second magnet fieldstrength, the flip-up state, the flip-back state, the expanded state,and the like, refer to the related descriptions in the foregoingembodiment. Details are not described again in the present invention.

It should be further noted that, in the method embodiments of thisapplication, the first operation, the second operation, the thirdoperation, and the fourth operation may be the same or different, andthis is not limited in the present invention.

Optionally, the terminal may include a screen. The first operation maybe a screen off operation, and the second operation may be a screenwakeup operation or no operation; or the first operation may be a screenlocking operation, and the second operation may be an unlockingoperation, an operation of entering an unlocking interface, nooperation, or the like; or the first operation may be an operation ofclosing a specified application, and the second operation may be anoperation of opening the specified application, for example, the firstoperation is an operation of exiting Facebook, and the second operationis an operation of logging in to Facebook; or the first operation may bea power-off operation, and the second operation may be a power-onoperation; or when there is a coming call, the first operation may be anoperation of hanging up for the current coming call, and the secondoperation may be an operation of answering the current coming call; orwhen a current display interface is a display interface of a videoapplication, the first operation may be an operation of suspending acurrent displayed video, and the second operation may be an operation ofplaying the current displayed video. Alternatively, the first operationand the second operation may be other operations, and this is notlimited in the present invention.

Optionally, a user sets a specific operation for the third operation orthe fourth operation on the terminal. For example, the third operationis a screen wakeup operation, an unlocking operation, an operation ofentering an unlocking interface, an operation of opening a specifiedapplication, or an operation of increasing screen brightness, and thefourth operation is a screen off operation, a screen locking operation,an operation of closing the specified operation, or an operation ofreducing the screen brightness. Alternatively, the third operation orthe fourth operation may be another operation, and this is not limitedin the present invention.

In this embodiment of the present invention, when it is detected thatthe output signal of the first Hall effect sensor changes into the firstsignal and the output signal of the second Hall effect sensor changesinto the second signal, the terminal performs the first operation; orwhen it is detected that the output signal of the first Hall effectsensor changes into the third signal and the output signal of the secondHall effect sensor changes into the fourth signal, the terminal performsthe second operation. The terminal can be controlled only when aposition of the magnet meets response requirements for the two Halleffect sensors. In this way, terminal control is more precise.

In addition, in this embodiment of the present invention, positions ofthe magnet, the first Hall effect sensor, and the second Hall effectsensor are set, so that the first signal and the third signal haveopposite polarities, and the second signal and the fourth signal haveopposite polarities, thereby avoiding a misoperation of the terminal andimproving user experience.

Referring to FIG. 22, FIG. 22 is a schematic structural diagram of afourth terminal according to an embodiment of the present invention. Theterminal may include:

a detection unit 2210, configured to detect a change of an output signalof a first Hall effect sensor and a change of an output signal of asecond Hall effect sensor; and

a processing unit 2220, configured to perform a target operation inresponse to an operation of detecting that the output signal of thefirst Hall effect sensor changes and the output signal of the secondHall effect sensor changes, where

the first Hall effect sensor and the first Hall effect sensor outputsignals by sensing a magnetic field; and

the magnetic field is a magnetic field generated by a magnet built inthe terminal, or a magnetic field generated by a magnet built in aprotective case of the terminal.

In an embodiment of the present invention, the processing unit 2220 isspecifically configured to perform at least one of the following steps:

performing a first operation in response to an operation of detectingthat the output signal of the first Hall effect sensor changes into afirst signal and the output signal of the second Hall effect sensorchanges into a second signal;

performing a second operation in response to an operation of detectingthat the output signal of the first Hall effect sensor changes into athird signal and the output signal of the second Hall effect sensorchanges into a fourth signal; and

performing a third operation in response to an operation of detectingthat the output signal of the first Hall effect sensor changes into afifth signal and the output signal of the second Hall effect sensorchanges into a sixth signal, where

the first signal is an electrical signal output by the first Hall effectsensor when a magnetic field whose strength is not less than a firstmagnetic field strength passes through a working plane of the first Halleffect sensor from a first surface of the first Hall effect sensor, andthe second signal is an electrical signal output by the second Halleffect sensor when a magnetic field whose strength is not less than asecond magnetic field strength passes through a working plane of thesecond Hall effect sensor from a first surface of the second Hall effectsensor;

the third signal is an electrical signal output by the first Hall effectsensor when the magnetic field whose strength is not less than the firstmagnetic field strength passes through the working plane of the firstHall effect sensor from a second surface of the first Hall effectsensor, and the fourth signal is an electrical signal output by thesecond Hall effect sensor when the magnetic field whose strength is notless than the second magnetic field strength passes through the workingplane of the second Hall effect sensor from a second surface of thesecond Hall effect sensor; and

the fifth signal is an electrical signal output by the first Hall effectsensor when a magnetic field whose strength is less than the firstmagnetic field strength passes through the working plane of the firstHall effect sensor, and the sixth signal is an electrical signal outputby the second Hall effect sensor when a magnetic field whose strength isless than the second magnetic field strength passes through the workingplane of the second Hall effect sensor.

In an embodiment of the present invention, the first surface of thefirst Hall effect sensor and the second surface of the first Hall effectsensor are two opposite surfaces of the first Hall effect sensor, andboth the first surface of the first Hall effect sensor and the secondsurface of the first Hall effect sensor are parallel to the workingplane of the first Hall effect sensor; and

the first surface of the second Hall effect sensor and the secondsurface of the second Hall effect sensor are two opposite surfaces ofthe second Hall effect sensor, and both the first surface of the secondHall effect sensor and the second surface of the second Hall effectsensor are parallel to the working plane of the Hall effect sensor.

In an embodiment of the present invention, the first Hall effect sensorand the second Hall effect sensor are disposed in the protective case;and

the terminal further includes a receiving unit, configured to receive anoperation indication instruction sent by the protective case, where theoperation indication instruction is an instruction that is generated bythe protective case based on the change of the output signal of thefirst Hall effect sensor and the change of the output signal of thesecond Hall effect sensor and that is sent to the terminal, and is usedto instruct the terminal to perform the target operation.

In an embodiment of the present invention, the magnet is a strip magnet,and the protective case includes a base plate and a flip plate that areused to fasten the terminal, and a flip shaft that connects the baseplate and the flip plate; and

the first Hall effect sensor and the second Hall effect sensor aredisposed in the flip plate of the protective case, and the strip magnetis disposed in the terminal or the base plate of the protective case; orthe strip magnet is disposed in the flip plate of the protective case,and the first Hall effect sensor and the second Hall effect sensor aredisposed in the terminal or the base plate of the protective case.

In an embodiment of the present invention, the magnet is a strip magnet,and the terminal includes a first body, a second body, and a flip shaftthat connects the first body and the second body; and

the first Hall effect sensor and the second Hall effect sensor aredisposed in the first body, and the strip magnet is disposed in thesecond body.

In an embodiment of the present invention, the working plane of thefirst Hall effect sensor is parallel to the working plane of the secondHall effect sensor; and

when the terminal is in a closed state, a connection line between anorth pole of the magnet and a south pole of the magnet is parallel tothe working plane of the first Hall effect sensor, and a distancebetween the first Hall effect sensor or the second Hall effect sensorand a projection of the strip magnet onto a plane on which the workingplane of the first Hall effect sensor is located is greater than a firstdistance threshold.

In an embodiment of the present invention, the magnet includes a firstmagnet and a second magnet, the first magnet generates the magneticfield whose strength is not less than the first magnetic field strength,and the second magnet generates the magnetic field whose strength is notless than the second magnetic field strength.

Referring to FIG. 23, FIG. 23 is a schematic structural diagram ofanother protective case according to an embodiment of the presentinvention. The protective case includes:

a detection unit 2310, configured to detect an output signal of a firstHall effect sensor and an output signal of a second Hall effect sensor;and

a sending unit 2320, configured to send an operation indicationinstruction to a terminal in response to an operation of detecting thatthe output signal of the first Hall effect sensor changes and the outputsignal of the second Hall effect sensor changes, where the operationindication instruction is generated by the protective case based on achange of the output signal of the first Hall effect sensor and a changeof the output signal of the second Hall effect sensor, and is used toinstruct the terminal to perform a target operation, where

the first Hall effect sensor and the first Hall effect sensor outputsignals by sensing a magnetic field; and

the magnetic field is a magnetic field generated by a magnet built inthe terminal, or a magnetic field generated by a magnet built in theprotective case of the terminal, and the first Hall effect sensor andthe second Hall effect sensor are disposed in the protective case.

In an embodiment of the present invention, the sending unit 2320 isspecifically configured to perform at least one of the following steps:

sending a first operation indication instruction to the terminal inresponse to an operation of detecting that the output signal of thefirst Hall effect sensor changes into a first signal and the outputsignal of the second Hall effect sensor changes into a second signal,where the first operation indication instruction is generated by theprotective case based on the first signal and the second signal, and isused to instruct the terminal to perform a first operation;

sending a second operation indication instruction to the terminal inresponse to an operation of detecting that the output signal of thefirst Hall effect sensor changes into a third signal and the outputsignal of the second Hall effect sensor changes into a fourth signal,where the second operation indication instruction is generated by theprotective case based on the third signal and the fourth signal, and isused to instruct the terminal to perform a second operation; and

sending a third operation indication instruction to the terminal inresponse to an operation of detecting that the output signal of thefirst Hall effect sensor changes into a fifth signal and the outputsignal of the second Hall effect sensor changes into a sixth signal,where the third operation indication instruction is generated by theprotective case based on the fifth signal and the sixth signal, and isused to instruct the terminal to perform a third operation, where

the first signal is an electrical signal output by the first Hall effectsensor when a magnetic field whose strength is not less than a firstmagnetic field strength passes through a working plane of the first Halleffect sensor from a first surface of the first Hall effect sensor, andthe second signal is an electrical signal output by the second Halleffect sensor when a magnetic field whose strength is not less than asecond magnetic field strength passes through a working plane of thesecond Hall effect sensor from a first surface of the second Hall effectsensor;

the third signal is an electrical signal output by the first Hall effectsensor when the magnetic field whose strength is not less than the firstmagnetic field strength passes through the working plane of the firstHall effect sensor from a second surface of the first Hall effectsensor, and the fourth signal is an electrical signal output by thesecond Hall effect sensor when the magnetic field whose strength is notless than the second magnetic field strength passes through the workingplane of the second Hall effect sensor from a second surface of thesecond Hall effect sensor; and

the fifth signal is an electrical signal output by the first Hall effectsensor when a magnetic field whose strength is less than the firstmagnetic field strength passes through the working plane of the firstHall effect sensor, and the sixth signal is an electrical signal outputby the second Hall effect sensor when a magnetic field whose strength isless than the second magnetic field strength passes through the workingplane of the second Hall effect sensor.

In an embodiment of the present invention, the first surface of thefirst Hall effect sensor and the second surface of the first Hall effectsensor are two opposite surfaces of the first Hall effect sensor, andboth the first surface of the first Hall effect sensor and the secondsurface of the first Hall effect sensor are parallel to the workingplane of the first Hall effect sensor; and

the first surface of the second Hall effect sensor and the secondsurface of the second Hall effect sensor are two opposite surfaces ofthe second Hall effect sensor, and both the first surface of the secondHall effect sensor and the second surface of the second Hall effectsensor are parallel to the working plane of the Hall effect sensor.

In an embodiment of the present invention, the protective case includesa base plate and a flip plate that are used to fasten the terminal, anda flip shaft that connects the base plate and the flip plate; and

the first Hall effect sensor and the second Hall effect sensor aredisposed in the flip plate, and the magnet is disposed in the terminalor the base plate of the protective case; or the first Hall effectsensor and the second Hall effect sensor are disposed in the base plate,and the magnet is disposed in the flip plate.

In an embodiment of the present invention, the magnet is a strip magnet,and the working plane of the first Hall effect sensor is parallel to theworking plane of the second Hall effect sensor; and

when the protective case is in a closed state, a connection line betweena north pole of the magnet and a south pole of the magnet is parallel tothe working plane of the first Hall effect sensor, and a distancebetween the first Hall effect sensor or the second Hall effect sensorand a projection of the strip magnet onto a plane on which the workingplane of the first Hall effect sensor is located is greater than a firstdistance threshold.

In an embodiment of the present invention, the magnet includes a firstmagnet and a second magnet, the first magnet generates the magneticfield whose strength is not less than the first magnetic field strength,and the second magnet generates the magnetic field whose strength is notless than the second magnetic field strength.

The technical terms used in the embodiments of the present invention aremerely used to describe specific embodiments, but are not intended tolimit the present invention. In this specification, singular forms“one”, “this”, and “the” are intended to include plural forms unlessotherwise specified in the context clearly. Further, the term “include”and/or “contain” used in this specification refers to presence offeatures, entirety, steps, operations, elements, and/or components, butdoes not exclude presence or addition of one or more other features,entirety, steps, operations, elements, and/or components.

In the appended claims, the corresponding structures, materials,actions, and equivalent forms (if any) of all apparatuses or steps andfunctional elements are intended to include any structure, material, oraction that is used to perform the function with reference to otherexplicitly required elements. The descriptions of the present inventionare given for the purposes of the embodiments and the descriptions, butare not intended to be exhaustive or limit the present invention to thedisclosed form.

What is claimed is:
 1. A terminal control method, comprising: detectingthat an output signal of a first Hall effect sensor changes into a firstsignal and an output signal of a second Hall effect sensor changes intoa second signal, wherein the first signal is output by the first Halleffect sensor when a magnetic field whose strength is not less than afirst magnetic field strength passes through a working plane of thefirst Hall effect sensor from a first surface of the first Hall effectsensor, and wherein the second signal is output by the second Halleffect sensor when a magnetic field whose strength is not less than asecond magnetic field strength passes through a working plane of thesecond Hall effect sensor from a first surface of the second Hall effectsensor; detecting that an output signal of the first Hall effect sensorchanges into a third signal and an output signal of the second Halleffect sensor changes into a fourth signal, wherein the third signal isoutput by the first Hall effect sensor when a magnetic field whosestrength is not less than the first magnetic field strength passesthrough the working plane of the first Hall effect sensor from a secondsurface of the first Hall effect sensor that is different from the firstsurface of the first Hall effect sensor, and wherein the fourth signalis output by the second Hall effect sensor when a magnetic field whosestrength is not less than the second magnetic field strength passesthrough the working plane of the second Hall effect sensor from a secondsurface of the second Hall effect sensor that is different from thefirst surface of the second Hall effect sensor; and performing a screenoff operation in response to the detecting the output signal of thefirst Hall effect sensor changes into the first signal and the outputsignal of the second Hall effect sensor changes into the second signal,wherein the magnetic field is generated by a magnet built in a terminalor by a magnet built in a protective case of the terminal.
 2. The methodaccording to claim 1, wherein the first surface of the first Hall effectsensor and the second surface of the first Hall effect sensor are twoopposite surfaces of the first Hall effect sensor, wherein both thefirst surface of the first Hall effect sensor and the second surface ofthe first Hall effect sensor are parallel to the working plane of thefirst Hall effect sensor, wherein the first surface of the second Halleffect sensor and the second surface of the second Hall effect sensorare two opposite surfaces of the second Hall effect sensor, and whereinboth the first surface of the second Hall effect sensor and the secondsurface of the second Hall effect sensor are parallel to the workingplane of the second Hall effect sensor.
 3. The method according to claim1, wherein the first Hall effect sensor and the second Hall effectsensor are disposed in the protective case, wherein before performingthe screen off operation, the method further comprises receiving anoperation indication instruction from the protective case, wherein theoperation indication instruction is generated by the protective casebased on a change of the output signal of the first Hall effect sensorand a change of the output signal of the second Hall effect sensor, andwherein the operation indication instruction instructs the terminal toperform the screen off operation.
 4. The method according to claim 1,wherein the magnet is a strip magnet, and wherein the protective casecomprises: a base plate and a flip plate used to fasten the terminal;and a flip shaft connecting the base plate and the flip plate, whereinthe strip magnet is disposed in the flip plate of the protective case,and wherein the first Hall effect sensor and the second Hall effectsensor are disposed in the terminal or the base plate of the protectivecase.
 5. The method according to claim 1, wherein the magnet is a stripmagnet, wherein the terminal comprises a first body, a second body, anda flip shaft that connects the first body and the second body, whereinthe first Hall effect sensor and the second Hall effect sensor aredisposed in the first body, and wherein the strip magnet is disposed inthe second body.
 6. The method according to claim 4, wherein the workingplane of the first Hall effect sensor is parallel to the working planeof the second Hall effect sensor, wherein when the terminal is in aclosed state, a connection line between a north pole of the magnet and asouth pole of the magnet is parallel to the working plane of the firstHall effect sensor, and wherein a distance between the first Hall effectsensor or the second Hall effect sensor and a projection of the stripmagnet onto a plane on which the working plane of the first Hall effectsensor is located is greater than a first distance threshold.
 7. Themethod according to claim 1, wherein the magnet comprises a first magnetand a second magnet, wherein the first magnet generates the magneticfield whose strength is not less than the first magnetic field strength,and wherein the second magnet generates the magnetic field whosestrength is not less than the second magnetic field strength.
 8. Aterminal, comprising: a memory storing executable instructions; and aprocessor coupled to the memory, wherein the processor is configured toexecute the instructions to: detect that an output signal of a firstHall effect sensor changes into a first signal and an output signal of asecond Hall effect sensor changes into a second signal, wherein thefirst signal is output by the first Hall effect sensor when a magneticfield whose strength is not less than a first magnetic field strengthpasses through a working plane of the first Hall effect sensor from afirst surface of the first Hall effect sensor, and wherein the secondsignal is output by the second Hall effect sensor when the magneticfield whose strength is not less than a second magnetic field strengthpasses through the working plane of the second Hall effect sensor from afirst surface of the second Hall effect sensor; detect that an outputsignal of the first Hall effect sensor changes into a third signal andan output signal of the second Hall effect sensor changes into a fourthsignal, wherein the third signal is output by the first Hall effectsensor when a magnetic field whose strength is not less than the firstmagnetic field strength passes through the working plane of the firstHall effect sensor from a second surface of the first Hall effect sensorthat is different from the first surface of the first Hall effectsensor, and wherein the fourth signal is output by the second Halleffect sensor when a magnetic field whose strength is not less than thesecond magnetic field strength passes through the working plane of thesecond Hall effect sensor from a second surface of the second Halleffect sensor that is different from the first surface of the secondHall effect sensor; and perform a screen off operation in response todetecting that the output signal of the first Hall effect sensor changesinto the first signal and the output signal of the second Hall effectsensor changes into the second signal, wherein the magnetic field isgenerated by a magnet built in the terminal or by a magnet built in aprotective case of the terminal.
 9. The terminal according to claim 8,wherein the first surface of the first Hall effect sensor and the secondsurface of the first Hall effect sensor are two opposite surfaces of thefirst Hall effect sensor, wherein both the first surface of the firstHall effect sensor and the second surface of the first Hall effectsensor are parallel to the working plane of the first Hall effectsensor, wherein the first surface of the second Hall effect sensor andthe second surface of the second Hall effect sensor are two oppositesurfaces of the second Hall effect sensor, and wherein both the firstsurface of the second Hall effect sensor and the second surface of thesecond Hall effect sensor are parallel to the working plane of the Halleffect sensor.
 10. The terminal according to claim 8, wherein the firstHall effect sensor and the second Hall effect sensor are disposed in theprotective case, wherein before performing the on operation, theprocessor is further configured to receive an operation indicationinstruction from the protective case, wherein the operation indicationinstruction is generated by the protective case based on a change of theoutput signal of the first Hall effect sensor and a change of the outputsignal of the second Hall effect sensor, and wherein the operationindication instruction instructs the terminal to perform the onoperation.
 11. The terminal according to claim 10, wherein the magnet isa strip magnet, wherein the protective case comprises: a base plate anda flip plate used to fasten the terminal; and a flip shaft connectingthe base plate and the flip plate, wherein the strip magnet is disposedin the flip plate of the protective case, and wherein the first Halleffect sensor and the second Hall effect sensor are disposed in theterminal or the base plate of the protective case.
 12. The terminalaccording to claim 8, wherein the magnet is a strip magnet, wherein theterminal comprises a first body, a second body, and a flip shaft thatconnects the first body and the second body, wherein the first Halleffect sensor and the second Hall effect sensor are disposed in thefirst body, and wherein the strip magnet is disposed in the second body.13. The terminal according to claim 11, wherein the working plane of thefirst Hall effect sensor is parallel to the working plane of the secondHall effect sensor, wherein when the terminal is in a closed state, aconnection line between a north pole of the magnet and a south pole ofthe magnet is parallel to the working plane of the first Hall effectsensor, and wherein a distance between the first Hall effect sensor orthe second Hall effect sensor and a projection of the strip magnet ontoa plane on which the working plane of the first Hall effect sensor islocated is greater than a first distance threshold.
 14. The terminalaccording to claim 8, wherein the magnet comprises a first magnet and asecond magnet, wherein the first magnet generates the magnetic fieldwhose strength is not less than the first magnetic field strength, andwherein the second magnet generates the magnetic field whose strength isnot less than the second magnetic field strength.
 15. A protective case,comprising: a base plate and a flip plate that are used to fasten aterminal; and a flip shaft connecting the base plate and the flip plate,wherein a status of the protective case changes by using the flip shaft,wherein the first Hall effect sensor and the second Hall effect sensorare disposed in the base plate or the terminal and the magnet isdisposed in the flip plate, wherein the first Hall effect sensor and thefirst Hall effect sensor output signals by sensing a magnetic field, andwherein the protective case is configured to instruct the terminal toperform a screen off operation in response to detecting that an outputsignal of the first Hall effect sensor changes into a first signal andan output signal of the second Hall effect sensor changes into a secondsignal, wherein the first signal is output by the first Hall effectsensor when a magnetic field whose strength is not less than a firstmagnetic field strength passes through the working plane of the firstHall effect sensor from a first surface of the first Hall effect sensor,and wherein the second signal is output by the second Hall effect sensorwhen a magnetic field whose strength is not less than a second magneticfield strength passes through the working plane of the second Halleffect sensor from a first surface of the second Hall effect sensor. 16.The protective case according to claim 15, wherein when the protectivecase is in a flip-up state, a magnetic field whose strength is not lessthan a first magnetic field strength and that is generated by the magnetpasses through a working plane of the first Hall effect sensor from afirst surface, the first Hall effect sensor outputs a first signal, amagnetic field whose strength is not less than a second magnetic fieldstrength and that is generated by the magnet passes through a workingplane of the second Hall effect sensor from the first surface, and thesecond Hall effect sensor outputs a second signal; wherein when theprotective case is in a flip-back state, the magnetic field whosestrength is not less than the first magnetic field strength and that isgenerated by the magnet passes through the working plane of the firstHall effect sensor from a second surface, the first Hall effect sensoroutputs a third signal, the magnetic field whose strength is not lessthan the second magnetic field strength and that is generated by themagnet passes through the working plane of the second Hall effect sensorfrom the second surface, and the second Hall effect sensor outputs afourth signal; and wherein when the protective case is in an expandedstate, a magnetic field whose strength is less than the first magneticfield strength and that is generated by the magnet passes through theworking plane of the first Hall effect sensor, the first Hall effectsensor outputs a fifth signal, a magnetic field whose strength is lessthan the second magnetic field strength and that is generated by themagnet passes through the working plane of the second Hall effectsensor, and the second Hall effect sensor outputs a sixth signal.